Skip to content

kalmux1/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python GUI Calculator

Calculator GUI

Overview

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.

✨ Features

  • 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.

📚 Requirements

  • Python 3.12.5
  • Tkinter (usually included with Python installations)

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/kalmux1/Calculator.git
    cd Calculator
  2. Run the application:

    python calculator.py

🛠️ How It Works

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.

🤝 Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any improvements or bug fixes.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📫 Contact

If you have any questions, feel free to reach out via LinkedIn or open an issue on GitHub.