Question: Calculator.py Write a Program that displays repeatedly a menu as shown in the sample run below. The user will enter 1, 2, 3, 4 or

Calculator.py

Write a Program that displays repeatedly a menu as shown in the sample run below.

The user will enter 1, 2, 3, 4 or 5 for choosing an addition, substation, multiplication, division or exit respectively.

After an operation is finished and output is displayed the menu is redisplayed, you may choose another operation or enter 5 to exit the program.

Each operation will ask the user for two numbers then calculate and display the answer.

All the Mathematical operations has to be defined within functions: add(number1,number2), subtract(number1,number2), multiply(number1, number2) and divide(number1,number2). The menu Also will be also defined within a function called menu()

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!