This is a simple command-line calculator implemented in Python. It supports basic arithmetic operations such as addition, subtraction, multiplication, and division.
- Run the Python script
calculator.py
. - Follow the on-screen instructions to select the desired arithmetic operation and enter the required numbers.
- The result of the operation will be displayed.
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
1,2,3,4: 1 #Addition First number: 8 Second number: 2 Result: 10 Do you want to perform another calculation? (yes/no): no
- Division by zero is not allowed. If you attempt to divide by zero, an error message will be displayed.
- This calculator is a basic implementation and may not handle complex expressions or edge cases.