Question: OBJECTIVE You will learn to test for conditions, use a while loop, and do very basic string manipulations. THE PROBLEM You are to write a

OBJECTIVE You will learn to test for conditions, use a while loop, and do very basic string manipulations. THE PROBLEM You are to write a program converting integer numbers betweenl and 99 into its word form as in Enter an integer number between 1 and 99: 37 Thirty-seven Enter an integer number between e and 999: 2 Two Enter an integer number between e and 999: 50 Fifty Enter an integer number between e and 999: 17 Seventeen Enter an integer number between e and 999: 0 Done Your program should output "Done" and terminate when the user enter any integer that is not within the range HINTS: 1. 2. Note that the correct word form of 37 is Thirty-seven and not Thirty seven You will have to consider two distinct cases: a. The number is between 20 and 99 b. The number is less than twenty 3. If your number is greater than 20, you can use integer division to extract the number of tens and the remainder operator to extract the remainder of the number: 37//10 = 35 and 37%10-7. You might want to use the following lists zero2nineteen ['zero', 'one, 'two', ..., 'eighteen', 'nineteen'] 4. zero2ninety['zero', 'ten', 'twenty",.., 'eighty', 'ninety'] The two lists are designed to have zero2nineteen[12]'twelve' and zero2ninety[3] 'thirty. = 5. Pay a lot of attention to your indentation and do not forget the':' in your if and else statements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
