Question: Design a program called A3_FirstName_LastName.py which reads in a non-negative integer from the user. The user will then be prompted with a menu of choices

Design a program called A3_FirstName_LastName.py which reads in a non-negative integer from the user. The user will then be prompted with a menu of choices (this menu should be repetitively displayed until the user chooses to quit): You must prompt the user for the integer and give the option to quit. You must complete TWO of #1, #2,and #3. (SEE EXTRA CREDIT)

Your program will include these choices (stub out the one you dont implement.) Enter a new number1. Print the factorial of the integer2. Print the prime numbers between 2 and the integer3. Print the sum of the integers from 1 to the integer entered0.Quit the program

PROGRAM PARTICULARS:

When the program starts up, ask the user for a non-negative integer. After the user enters the non-negative integer, display the above menu. Remember the user can choose to do #1, #2, and #3 on the same number. Meaning, once you have the number from the user do not make the user enter a new number each time. The user can keep the same number until the user selects option 0 (see example output below.)There must be error checking on the input integer: if it is negative, the program will print an error message and re-prompt. This process will continue until valid input is entered. You may assume an integer of some form will be entered by the user.There must be error checking on the menu choice entered: if the user enters a choice not on the menu, the program will print an error message, re-display the menu and re-prompt. This process will continue until valid input is entered.No string variables are allowed.No built-in methods for integer manipulation are allowed. You may assume that no integer entered will be greater than the maximum integer size for type int.You will need to utilize at least one for loop and one while loop while executing the menu choices.

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!