Python program to convert decimal number to binary number

preview_player
Показать описание
Question 13- write a program to accept a decimal number and display its binary number.

Class 11 - First Python Assignment solution
#python #pythonprogram

👉Source code is given in the comment box💖💖

Guys if you also want that i solve your question then comment me.

Asked by
Rashmi Singh
Рекомендации по теме
Комментарии
Автор

#decimalToBinary

def decimalToBinary(num):

if num > 1:
decimalToBinary(num // 2)
print(num % 2, end='')


number = int(input("Enter any decimal number: "))

decimalToBinary(number)

parvatcomputertechnology
Автор

Can you please explain how this code works, I've been trying to figure it out for 30 minutes.

lukasmacku
join shbcf.ru