Answer to Question #182822 in Python for vijay

Question #182822

Number to English Words

Write a program to convert a non-negative integer

N to its English words representation.Input

The input will be a single line containing an integer

N. Note: The input number will not be greater than 1010.Output

The output should be a single line containing the representation of the English words of number

N. See the sample input and output for the English words of numbers in places.Explanation

For example, if the given number is 123, your code should print the English words representation, which is

One Hundred Twenty Three

Sample Input 1

123

Sample Output 1

One Hundred Twenty Three

Sample Input 2

10005

Sample Output 2

Ten Thousand Five

Sample Input 3

1234567891

Sample Output 3

One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety One




1
Expert's answer
2021-04-19T01:40:49-0400
import num2words
print(num2words.num2words(input()))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS