uwaismohammed46
uwaismohammed46 uwaismohammed46
  • 25-02-2021
  • Computers and Technology
contestada

write a python program to convert a number entered by the user
the input is 985
the output is Nine Eight Five

Respuesta :

ooo510125
ooo510125 ooo510125
  • 25-02-2021

Answer:

# Function to convert decimal number

# to binary using recursion

def DecimalToBinary(num):

if num >= 1:

DecimalToBinary(num // 2)

print(num % 2, end = '')

# Driver Code

if __name__ == '__main__':

# decimal value

dec_val = 24

# Calling function

DecimalToBinary(dec_val)

Explanation:

Answer Link

Otras preguntas

PLEASE HELP ME Hawaii was surrendered to the U.S. after a _________.
What is the (possessive noun) in this sentence. The equipment belonging to the tennis team
Using compatible numbers to estimate 83+34
Solve and explain the inequality problem 13x +-7(-2+x) is greater or equal to 4x + -10
2 factors of 24 add up to 11 what r they
what is half of 750 i really need help
what holds the atoms in plastic together
If the Revenue for the week is $2000, and labor cost consists of two workers earning $8 per hour who work 40 hours each, what is labor cost as a percentage of R
what is the mean of these numbers 6,7,11
The information for two pay as you go cell phone companies is given On call 3.5 hours :$10 1/2hour:1.25 What is the unit rate in dollars per hour for each com