Skip to content

This is a simple graphical user interface (GUI) calculator created using Python and the Tkinter library. It allows you to perform basic mathematical operations and additional operations like factorial and exponentiation.

License

Notifications You must be signed in to change notification settings

MusaTahawar/GUI-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Calculator GUI in Python

This is a simple graphical user interface (GUI) calculator created using Python and the Tkinter library. It allows you to perform basic mathematical operations and additional operations like factorial and exponentiation.

Features

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Exponentiation (^)
  • Factorial (!)
  • Clear (C)
  • Error handling for invalid expressions

Requirements

  • Python 3.x
  • Tkinter (usually included with Python)

Usage

  1. Clone this repository:
git clone https://github.com/yourusername/simple-calculator.git

cd simple-calculator

  • Run the Python script: bash

python main.py The calculator GUI will open, allowing you to perform calculations.

How to Use

  • Click the numeric buttons to enter numbers.
  • Click the operation buttons (+, -, *, /, ^, !) to perform calculations.
  • Click the "=" button to display the result.
  • Click the "C" button to clear the display.
  • Invalid expressions will result in an "Error" message.

Example

To calculate 5 factorial:

  • Click "5"
  • Click "!"
  • Click "="
  • The result should be displayed as "120."

To calculate 2^3:

  • Click "2"
  • Click "^"
  • Click "3"
  • Click "="
  • The result should be displayed as "8."

License

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

Acknowledgments

This project was created as a simple example of building a GUI calculator with Python and Tkinter. Feel free to modify and improve this calculator or use it as a reference for your own projects. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.

In this README, you can provide a brief description of the project, list its features, o

About

This is a simple graphical user interface (GUI) calculator created using Python and the Tkinter library. It allows you to perform basic mathematical operations and additional operations like factorial and exponentiation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages