what is the input for the decimalToBinary function? if I set num =2. How this function works.
def decimalToBinary(num): # num = 2 at the start
"""This function converts decimal number
to binary and prints it"""
if num > 1: #terminate loop
decimalToBinary(num // 2) # what this function will give output ? num =2 or 1?
print(num % 2) # what will be the input values here? num = 1 or 2
decimal number
number = int(input("Enter any decimal number: ")) decimalToBinary(number)