Question
Assignment 3 Menu Driven Application See Canvas for due date 40 Points Design a program called A3_FirstName_LastName.py which reads in a non-negativeinteger from the user.
Assignment 3 Menu Driven Application See Canvas for due date 40 Points Design a program called A3_FirstName_LastName.py which reads in a non-negativeinteger 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 completeTWOof #1, #2,and #3. (SEE EXTRACREDIT)Yourprogramwill 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 programPROGRAM 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 #3on 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 Assignment 3 Menu Driven Application See Canvas for due date 40 Points Design a program called A3_FirstName_LastName.py which reads in a non-negativeinteger 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 completeTWOof #1, #2,and #3. (SEE EXTRACREDIT)Yourprogramwill 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 programPROGRAM 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 #3on 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 Please enter a non-negative integer--> -12I am sorry that is not a non-negative integer. Please enter a non-negative integer!Welcome to Integer fun.Please enter a non-negative integer--> 33Integer Fun Menu1. Print the factorial of the integer entered by the user2. Print the prime numbers between 2 and the integer entered by the user3. Print the sum of the integers from 1 to the integer entered by the user.0. Quit.Please enter a valid choice: 1The factorial of 33 is 8683317618811886495518194401280000000!Integer Fun Menu1. Print the factorial of the integer entered by the user2. Print the prime numbers between 2 and the integer entered by the user3. Print the sum of the integers from 1 to the integer entered by the user.0. Quit.Please enter a valid choice: 2Prime numbers between two and 33 are:2 3 5 7 11 13 17 19 23 29 31 Integer Fun Menu 1. Print the factorial of the integer entered by the user2. Print the prime numbers between 2 and the integer entered by the user3. Print the sum of the integers from 1 to the integer entered by the user.0. Quit.Please enter a valid choice: 3The sum of the integers from one to 33 are 561.Integer Fun Menu1. Print the factorial of the integer entered by the user2. Print the prime numbers between 2 and the integer entered by the user3. Print the sum of the integers from 1 to the integer entered by the user.0. Quit.Please enter a valid choice: 99Please enter a valid number 1~ 3 or 0Integer Fun Menu1. Print the factorial of the integer entered by the user2. Print the prime numbers between 2 and the integer entered by the user3. Print the sum of the integers from 1 to the integer entered by the user.0. Quit.Please enter a valid choice: 0Thank you. Have a nice day.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started