I am new to Python and coding. This is what I have so far, but can\'t get it to work.
def halve_to_2( num ): while True: num = num /2 if num < 2: else: if num <