#full marks
This is a python assignment for the following problems:
Part 1:
This programming assignment assumes ‘a’ takes either positive or negative integer value while b takes only positive integer value . After removing spaces in the valid arithmetic operation which will then take the form of
a+b, a-b, ab and a/b
-a+b, -a-b, -ab and a/b
Note there are No spaces between a and the sign operation and also sign operation and b. Assume that all input entries by the user are valid.
An important function in the developed program solution is testing. Your program should test for all possible valid data entries.
Part 2:
After having successfully implemented the solution for part 1, you are now required to make changes to your developed program in part 1 to detect any non-valid arithmetic operations by informing the user “it’s an invalid arithmetic operation” and prompting the user to retry. A maximum of three tries are given to the user and the program terminates when the user exceeds the number of tries.
The valid input arithmetic operation is of the form given below:
a + b, a + -b, a+ -b, a +-b, a+-b
-a + b, -a + -b, -a+ -b, -a +-b, -a+-b