General information: Code can only preform mathimatical operations with two numbers. Mathematical actions are limited to addition, subtraction, multiplication and division.
- Asks the user to enter the first number.
- Tries to turn that input into an integer. If it fails (e.g., user types “abc”), it prints “Invalid input.”
- Asks the user which operation they want (+, -, *, or /). If the choice is not one of these, it prints “Invalid input.”
- Asks the user to enter the second number.
- Tries to turn that into an integer. If it fails, it prints “Invalid input.”
- If the action is valid, performs the chosen math operation: addition, subtraction, multiplication, or division.
- If division is chosen and the second number is 0, it warns “Division by zero is not possible.”
- Displays the result of the calculation in the terminal.