Description
This program will define four subroutines - add, subtract, multiply, divide that add multiply. Two numbers and return the result. Each should have two integer number arguments. The user is asked to input two numbers. These numbers will be passed as arguments into one of the subroutines. The user is asked to input 1 to add, 2 to subtract. If input 1, calls the ‘add’ subroutine, input 2 calls the ‘subtract’ subroutine. Output the returned result as part of a sentence.
Reflection
This project is in my top 3 favorite assignments that I completed this Term. I believe it is one of my most successful works because I created a fully functioning calculator using the math operators like addition, subtraction, multiplication and division. I very enjoyed testing my code in between and seeing that I worked. I was introduced to if statements that test is true or not. I like that the user has the ability to input the symbol of the operation and the math would still work. To strengthen the code, I would import the math module and add more operation like square rooting a number.