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

Some help would be nice! :)
4.1.2 Quiz: The Bill of Rights in Depth DAILY NEWS Police Guild: Exclusionary Rule Is Tying Our Hands How are these headlines related to the Bill of Rights? A.
help me with this math question please I'm giving away brainliests​
Machen Sie zu zweit ein Satzpuzzle . Schreiben Sie fünf Sätze mit den Wörtern aus dem Kasten und aus dem Bildlexikon . Zerschneiden Sie die Sätze und geben Sie
Will give brainliest
In a two digit number, the tens digit is 2 less than the units digit multiplied by three. The reversed number is half the original number plus 1/2. What is the
define reflex action in your own words
which two forms of rhetoric are used in the example?
an artificial satellite of mass 900 kg is lunched at a speed of 11,000m/s from its launching station. how much is the kinetic energy imparted to it?​
Two plumbers received a job. At first, one of the plumbers worked alone for 1 hour, and then they worked together for the next 4 hours. After this 40% of the jo