Skip to content

KrishnaSingh-bit/Calculator-tkinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Tkinter Calculator (v2)

An enhanced and visually polished calculator built with Python's Tkinter library โ€” version 2 introduces a modern color scheme, improved input validation, and a live expression history display.

Calculator UI Preview


๐Ÿš€ Features

  • Basic arithmetic operations: +, -, ร—, รท
  • Live expression preview (history-like feature)
  • Error handling for invalid inputs (e.g., โš ๏ธ Error)
  • AC (All Clear) and CE (Clear Entry) buttons
  • Prevents alphabetical input in the entry field
  • Enhanced color scheme and cleaner UI layout

๐Ÿ›  Tech Stack

  • Language: Python 3
  • GUI Library: Tkinter (comes built-in with Python)

๐Ÿ“ฅ How to Run

  1. Make sure Python is installed on your system.
  2. Clone this repository:
git clone https://github.com/KrishnaSingh-bit/Calculator-tkinter.git
  1. Navigate to the project folder and run:
cd tkinter-calculator
python main.py
  1. Verify if Tkinter is available:
python -m tkinter

๐Ÿ’ก Also, ensure image.png (the icon) and screenshot.png are placed correctly in the same directory.


๐Ÿ“ Project Structure

๐Ÿ“ tkinter-calculator/
 โ”ฃ ๐Ÿ“„ main.py      # Main app file (v2)
 โ”ฃ ๐Ÿ“„ README.md          # Project readme (this file)
 โ”ฃ ๐Ÿ“ท screenshot.png     # UI image
 โ”— ๐Ÿ–ผ image.png           # Window icon for the app

๐Ÿ’ก What I Learned

  • Managing Tkinter widgets and grid-based layouts
  • Input validation using validatecommand
  • Handling errors with try/except inside a GUI context
  • Using StringVar() and .trace() for real-time updates
  • Making cleaner, user-friendly UI designs

โœจ Future Ideas

  • Keyboard input bindings for faster input
  • Add scientific operations (e.g., sin, cos, log)
  • Responsive design or fullscreen toggle
  • Theme toggle: light/dark modes
  • Exporting expression history

๐Ÿ“œ License

This project is open-source under the MIT License.


๐Ÿ™‹โ€โ™‚๏ธ About Me

Hi! I'm Krishna Singh, a student and aspiring Computer Science engineer.
This is version 2 of my calculator GUI project โ€” feel free to try it out or share feedback!

About

Simple calculator using Tkinter with real-time evaluation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages