03 Feb Monday 20:00 Python Practice 21.02.01.
Question:
Continue modify the following method in the SimpleCalc class we made in the class:
def getResult(self):
so that it will check the following conditions:
-
- number 1 has to be a number (you can consider using try and except to do it)
- number 2 should not be empty and has to be a number
- the self.op should not be None
Please use self.str_result to display the error message
No Comments