<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_power_of_2(num):
 """Return whether `num` is a power of two"""

    log = math.log2(num)
    return int(log) == float(log)