# Denary to binary problem # Function to convert a denary number to binary using repeated division by 2 def DenToBin(Number): Binary = "" while Number > 0: # Return remainder using modulus 2 Remainder = Number % 2 # Cast remainder to a string to concatenate to binary sequence Binary = str(Remainder) + Binary # Integer divide the number by 2 Number = Number // 2 return Binary # Main program print(DenToBin(26))