The code itself is using the variable x which starts as 0 and num which is x % 2.
The code takes x and adds 1 or 2 to x depending on user input. An example of the functionality is:
if num != int: print('hi') 
and a contrasting statement:
elif num == int: print("hello")
The code always prints "hi" no matter if num is a whole number or a fraction.