A basic calculator with command-line interface written in Python.
This is a simple calculator program written in Python that allows users to perform basic arithmetic operations. It provides a command-line interface for users to input their calculations.
- Addition
- Subtraction
- Multiplication
- Division
- Exponentiation
- Modulus
- View Calculation History
- Run the calculator script in your Python environment.
- Choose the desired operation from the menu.
- Enter the required numbers when prompted.
- View the result and choose whether to continue or terminate.
- Addition (+): Add two numbers.
- Subtraction (-): Subtract the second number from the first.
- Multiplication (*): Multiply two numbers.
- Division (/): Divide the first number by the second. Note: Division by zero is handled.
- Exponentiation (^): Raise the first number to the power of the second.
- Modulus (%): Calculate the remainder of the division of the first number by the second.
- Terminate (#): Exit the calculator.
- Reset ($): Reset the calculator for a new set of calculations.
- History (?): View past calculations.
The calculator keeps track of previous calculations. You can view the calculation history by choosing the '?' option from the menu.
This project is licensed under the MIT License - see the LICENSE file for details.