Answered You can hire a professional tutor to get the answer.

QUESTION

def main(): describeTask() import Validation.isNumber import Validation.isWithinRange verbalizeNumber() def verbalizeNumber(): thousands = [...

This is to repair some code that I took 8 hours to write yesterday. I am sure for you, this will practically mean piecing together the code to get the desired outcome.

Here goes:

I. Write a function with the header def verbalize(number): that accepts a positive whole number with at most 27 digits as input and then displays the verbalization of the number. Number = 123000004056777888999012345  -- The code can be found in the attachment called VerbalizeNumber

Result:  The result is supposed to break down in this order:

123 septillion

0 sextillion

4 quintillion

56 quadrillion

777 trillion

888 billion

999 million

12 thousand

345

My results populate the desired outcome..but everything is not in order.  Sometimes I get a false start on how my prefix number is categorized (septillion vs octillion).   This seems to happen when my total number of digits is 6, 9 , 12..etc. Would you please help me with clean up?

Instructions:

II

a. Use a function named main to control the overall program flow.

b. Write a function to display instructions to the user for inputting a number.

c. Write a function to get an input from the user and validate the input (see below). Allow the user to enter strings as input. For number input, do not convert the string to a number data type (e.g., int or float) until the string passes "isNumber" data validation.

d. Import the "Validation.py" library module you created in Problem 1.

e. Call the isNumber function to validate user input.

f. Call the isWithinRange function to validate user input.

Steps:

1. Save all three python files in the same folder location

2. The VerbalizeNumber needs to be  edited to display the example shown above. (I am 90 percent done with that part.

3. The framework gets you started on exactly what I am requesting it is an outline of how the main function works. The main function calls all other necessary functions. If you need to discuss more, I am available. I've also posted my work for the Verbalize Python script on on python tutor:  http://www.pythontutor.com/visualize.html#togetherjs=

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question