The Calculator program is a simple command-line calculator implemented in Python. It allows users to perform basic mathematical operations such as addition, subtraction, multiplication, and division.
-
Run the Python script
calculator.py
in a Python environment. -
Select an operation from the menu:
- Addition
- Subtraction
- Multiplication
- Division
-
Enter the first number and the second number when prompted.
-
The program will display the result of the selected operation.
To run the Calculator program locally, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/calculator.git
cd calculator
Run the program:
bash
python calculator.py
Example
Here's an example of how the Calculator program looks when used:
Select an operation:
1. Addition
2. Subtraction
3. Multiplication
4. Division
Enter your choice (1-4): 1
Enter the first number: 5
Enter the second number: 3
Result: 8.0
Contributing
Contributions to the Calculator program are welcome! If you find any issues or have suggestions for improvement, feel free to submit a pull request.
License
This project is licensed under the MIT License.
Acknowledgments
The Calculator program was implemented as part of a programming exercise and serves as a basic example of a calculator in Python.
Feel free to customize the content, add additional sections, or modify it according to your preferences and project needs.