Question: Can some one help me solve this problem in Python . Write calculator program. It starts by asking the user for a number, then an

Can some one help me solve this problem in Python.

Write calculator program. It starts by asking the user for a number, then an operation. Based on the operation it should either ask for a second number to add(+),subtract(-),multiply(*), or divide(/) OR it should display the result(=). If an non-equals operation was pressed it should keep asking for more and more operations and second operands, until the equals sign is entered as the operation. Example execution below (Assume the user can follow directions, no need to verify they type a number or valid operation):

The output should be in this format:

Enter a number: 5

Enter an operation: +

Enter a number to add: 3

Result -- 8

Enter an operation: -

Enter a number to subtract: 1.2

Result -- 6.8

Enter an operation: =

Final Result -- 6.8

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!