Question: Write a Python program that is a Math Menu. When the program runs, it should do the following: In a loop that runs until quit

Write a Python program that is a Math Menu. When the program runs, it should do the following: In a loop that runs until quit is input by the user:

a) Display a menu offering a user to choose one of the following:

addition,

subtraction,

multiplication,

division,

quit

b) Read the user option from the keyboard

c) Display a message asking the user to enter two integers

d) Read the two whole (integers) numbers from the keyboard

e) Display a message asking the user to enter the answer depending on the option

f) Read the users answer from the keyboard.

g) If the option was addition, Add the two numbers entered by the user

Else if the option was subtraction Subtract the second number from the first entered by the user

Else if the option was multiplication Multiply the two numbers entered by the user

Else if the option was division Divide the first number by the second entered by the user

Else if the option was quit Display a message thanking the user for using the Math Menu

h) If not quit and the result of computation equals the user answer then Display the message that the answer is correct Else Display the message that the answer is incorrect and display the correct answer.

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!