0 out of 464 challenges solved
Write a Python function `highest_power_of_2(n)` that takes an integer `n` as input and returns the highest power of 2 that is less than or equal to `n`. #### Example Usage ```python [main.nopy] highest_power_of_2(10) # Output: 8 highest_power_of_2(19) # Output: 16 highest_power_of_2(32) # Output: 32 ```
def highest_power_of_2(n): """ Find the highest power of 2 less than or equal to n. Args: n (int): The input number. Returns: int: The highest power of 2 less than or equal to n. """ # Placeholder for the solution pass