Write a python program to input an integer by the user . Then print the digit name of the integer. For e.g. Input : 45 , Output : Four Five.
Share
Write a python program to input an integer by the user . Then print the digit name of the integer. For e.g. Input : 45 , Output : Four Five.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
Explanation:
n = str(input("enter number"))
a = ""
for i in range(len(n)):
if "1" in n[i]:
a += " one"
if "2" in n[i]:
a += " two"
if "3" in n[i]:
a += " three"
if "4" in n[i]:
a += " four"
if "5" in n[i]:
a += " five"
if "6" in n[i]:
a += " six"
if "7" in n[i]:
a += " seven"
if "8" in n[i]:
a += " eight"
if "9" in n[i]:
a += " nine"
if "0" in n[i]:
a += " zero"
print(a)