Question: Exercise 4 : Calculator Part 3 In python In this exercise, you'll be using the functions you made from exercises 3 and 4 to program

Exercise 4: Calculator Part 3 In python
In this exercise, you'll be using the functions you made from
exercises 3 and 4 to program a four-function calculator. This
calculator should have the following features:
add(num1, num2), sub(num1, num2), multiply(num1,
num2), and divide(num1, num2), where num 1 and num 2
may be given as floats or ints
the ability to continue performing user calculations until the
user types "exit".
user can select which operation they would like to perform
(either "add", "subtract", "multiply", "divide")
user can indicate whether they would like to use the
previous value as the first number in the next calculation
("yes" or "no"). If the user says "yes", the result of the
previous calculation should become num 1 for the next
calculation.
displays all calculations to 2 decimal places.
Note: NEVER round the calculations. Display the result
rounded to two decimal places, but always save the exact,
un-rounded value.
Exercise 4 : Calculator Part 3 In python In this

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 Programming Questions!