Question: 2. Integer to English word (Part 2). Write a Python program (called q2.py) to convert an integer from 0 to 1,000 into its English word

 2. Integer to English word (Part 2). Write a Python program

2. Integer to English word (Part 2). Write a Python program (called q2.py) to convert an integer from 0 to 1,000 into its English word equivalent. That is, 4 is four, 181 is one hundred eighty one, etc. Example. User input is shown on lines with the > symbol. On line 1, the user enters the number 4 and the computer outputs 'four' on line 2. Next, the user enters 181 (line 3) and the computer outputs 'one hundred eighty one' (line 4). For a user input of 1000 (line 5), the computer outputs 'one thousand' (line 6). On line 7, the user enters 773 and the computer outpus 'seven hundred seventy three' (line 8). Finally, the user types 'quit' (line 9) and the program terminates 2 four 3> 181 4 |one hundred elghty one 5 > 1000 6 one thousand 7773 8 seven hundred seventv three 9> quit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!