Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Calculator GUI

Description

A simple yet functional calculator with a graphical user interface built using Tkinter. Supports basic arithmetic operations with a modern, colorful design.

Features

  • Basic arithmetic operations (+, -, *, /)
  • Percentage calculations
  • Clear and backspace functionality
  • Decimal number support
  • Error handling for invalid expressions
  • Modern, colorful UI design
  • Keyboard-friendly interface

Stack

  • Language: Pure Python
  • Libraries: tkinter (standard library)
  • Complexity: Beginner

Installation & Usage

No external dependencies required! Just Python 3.x.

python main.py

Operations Supported

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Percentage (%)
  • Decimal (.)

Button Functions

  • C: Clear all
  • : Backspace (delete last character)
  • =: Calculate result
  • 0-9: Number input
  • +, -, *, /: Operators
  • %: Percentage
  • .: Decimal point

How It Works

  1. Click number buttons to build your expression
  2. Use operator buttons (+, -, *, /) for operations
  3. Press = to calculate the result
  4. Use C to clear or to delete last character

Color Scheme

  • Blue: Number buttons
  • Orange: Operator buttons
  • Red: Clear and backspace
  • Green: Equals button
  • Dark theme: Background

Learning Outcomes

  • Tkinter GUI development
  • Event handling
  • Grid layout management
  • Expression evaluation
  • Error handling
  • User interface design

Future Enhancements

  • Scientific calculator mode
  • History of calculations
  • Keyboard input support
  • Memory functions (M+, M-, MR, MC)
  • Theme customization
  • Copy/paste functionality

License

Open source for educational purposes.