Search for question
Question

PA06 Pocket Calculator

The goal of this assignment is to successfully solve the provided task by using:

• global variables... You will need to use these in your submitted file

• if, elif, else ... conditional statements

• <, >, <=, >=, ==, and, or, not ... one or more boolean logic comparators

• type casting

• +, * ... one or more string manipulation operators

• import ... importing files. This will be used when you test your file.

• def (var1, var2, ...)... defining functions with arguments

• return... returning values from functions

Task

You are tasked with implementing a calculator that performs calculations one step at a time on a stored value as described above. Additionally, the calculator saves a log of recent operations performed. The calculator will work only on int types.

Note: for this assignment, we will not cause zero division errors by trying to divide anything by 0. The operands passed into your step() function will be nonnegative, although that should not make a difference in your implementation.