This Python program is a simple 4-function calculator that allows users to perform basic arithmetic operations such as addition, multiplication, and division on two integer numbers. It displays a menu for selecting the desired operation, takes user input for two numbers, and calculates the result based on the chosen operation.
- Addition: Enter '+' to add two numbers.
- Multiplication: Enter 'X' (uppercase 'X') to multiply two numbers.
- Division: Enter '/' to divide two numbers.
-
Run the
calculator.py
script using Python. -
You will see a menu with the available operations:
- Enter '+' for addition.
- Enter 'X' for multiplication.
- Enter '/' for division.
-
Enter two integer numbers as prompted.
-
Choose the operation you want to perform based on the menu.
-
The program will calculate and display the result.
Menu:
: Add X : Multiply / : Divide Enter the first integer: 10 Enter the second integer: 5
Choose an operation (+, X, /): X
Result: 50
You can test the program online using Trinket by following this link. https://trinket.io/
If you encounter any issues or have questions, please don't hesitate to reach out for support.