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

Six less than 3/4 of a number is the same as the number. Find the number.
In the xy-plane, the point (p,r) lies on the line with equation y=x+b, where b is a constant. The point with coordinates (2p,5r) lies on the line with equation
Solve this equation: x/ 4 = 2.25
What is the solution to the system of equations shown??
Please help me I’ll give brainliest ❤️
Twenty seconds after a plane in the air show- dives, it is 300 feet from where it begin. At what rate is the plane diving ​
What do the military broadsides reveal about the day-by-day military challenges of the American Revolution?​
PLEASE HELP AND ONLY ANSWER IF YOU KNOW!!! I'LL GIVE THE CROWN What makes a subject or element a suitable target for parody? It is complex in form and structure
3. Which of these was NOT one of the dangers of the Oregon Trail? 1. Injury from a wagon accident 2. Attack from Native Americans 3. Death from a boat sinking 4
It will cost a total of $7,740 for 18 students to go to New York City for Spring Break. The cost for each student is the same. What is the cost for each student