Python program to convert the Decimal to Binary number.

In this basic python program, we will convert the Decimal to Binary number.

Steps to solve the program
  1. Take a decimal number as input.
  2. Convert the decimal number to its binary number using {0:b}.format(int(num)).
  3. Print the output.
				
					num = int(input("Enter a number: "))

print(f"Binary form of {num} is: ","{0:b}".format(int(num)))
				
			

Output :

				
					Enter a number: 25
Binary form of 25 is:  11001
				
			

get the current date.

find the sum of natural numbers.

Leave a Comment