Question: in python: Write a program that simulates a four-function calculator. The calculator should allow you to enter (on one line) an operation and a number

in python:
in python: Write a program that simulates a four-function calculator. The calculator

Write a program that simulates a four-function calculator. The calculator should allow you to enter (on one line) an operation and a number separated by a space (ie +15 ). The calculator should be able to add, subtract, multiply, or divide the number entered to the total calculated to that point After each operation the current total must be displayed. If the operation is the letter C, then the calculator should be cleared and the total reset to 0 . If the operation entered is Q then your program should end. Example, Operation: +35 Total +35 Operation: /7 Total +5 Operation:-14 Total:- 9 Operation: C Total: 0 Operation

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!