Skip to content

RecursiveFunc/Fancy-Calculator-using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fancy Calculator

A simple and stylish calculator built using Python's Tkinter library. This calculator supports basic arithmetic operations like addition, subtraction, multiplication, and division, along with features such as percentage calculation and square root. The user interface is enhanced with smooth hover effects and number formatting with commas and decimals.

Features

  • Basic arithmetic operations: +, -, *, /
  • Percentage calculation (%)
  • Square root calculation (√)
  • Number formatting (commas for thousands, decimal support)
  • Hover effects for buttons
  • Clean and minimal UI with dynamic button styling

Requirements

  • Python 3.x
  • Tkinter (comes pre-installed with Python)
  • locale for number formatting

Installation

  • Clone this repository:
git clone https://github.com/your-username/fancy-calculator.git
cd fancy-calculator
  • Ensure you have Python 3.x installed on your system.
  • If Tkinter is not installed, you can install it (though it is generally included with Python by default):
    • On Windows: Tkinter comes bundled with Python, so no need for installation.

    • On macOS/Linux:

      sudo apt-get install python3-tk
      

How to Use

  • Run the script using Python:
python calculator.py
  • Use the on-screen buttons to perform arithmetic operations.
    • Enter numbers and press +, -, *, or / for operations.
    • Press = to get the result.
    • Use C to clear the input field.
    • You can calculate percentages and square roots with the % and √ buttons.
  • Numbers are formatted with commas for thousands and can handle decimal points.

Code Structure

  • calculator.py: Main application file with logic and UI built using Tkinter.
  • README.md: This file.

Contributing

  • Fork this repository.
  • Create a new branch: git checkout -b feature-name
  • Commit your changes: git commit -m 'Add new feature'
  • Push to the branch: git push origin feature-name
  • Create a pull request.

Acknowledgements

  • Tkinter: The Python interface for the Tk GUI toolkit.
  • Python's locale module: Used for formatting numbers with commas.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages