This project is a simple yet powerful calculator built using Python and Tkinter. It supports basic arithmetic operations, advanced calculations like squares and cubes, and handles errors gracefully. The project showcases how Python can be used to create graphical user interfaces that are both functional and user-friendly.
- Basic Operations: Perform addition, subtraction, multiplication, and division.
- Advanced Calculations: Square (x²) and cube (x³) operations.
- Error Handling: Invalid inputs result in a clear "Error" message, ensuring a smooth user experience.
- Python 3.12.5
- Tkinter (usually included with Python installations)
-
Clone the repository:
git clone https://github.com/kalmux1/Calculator.git cd Calculator
-
Run the application:
python calculator.py
The calculator GUI is built using Tkinter, Python's standard GUI library. Here’s a brief overview of how the main components work:
- click(event): Handles button clicks and processes user inputs.
- eval(): Evaluates the arithmetic expressions entered by the user.
- Error Handling: Catches exceptions and displays an error message if the input is invalid.
Contributions are welcome! Please fork this repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, feel free to reach out via LinkedIn or open an issue on GitHub.