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

Evaluate d – (–3.5) when d = 2.74. A. –6.24 B. –0.76 C. 0.76 D. 6.24
what primary consumer eats reef and seaweed
What did Sumerian scribes do? a. wrote things for others b. kept historical archives c. taught reading and writing d. advised Sumerian rulers
why did Jamestown nearly fail ?
What is the answer for this exercises 1•2•3•4•.......•15=
Least to the greatest number of 103,718 and 121,356 and 113,635
Is tap water a compound, a homogenous mixture, or a heterogeneous mixture?
What factors likely led some early americans to change from hunting to farming
which is greater 0.83 or 83/100
What was the Inca practice of mitima?