Skip to content

Chetanchvn02/Python_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Multi-Number Calculator (Python)

A simple command-line calculator built in Python that supports multi-number input, advanced operations, and maintains calculation history.

๐Ÿš€ Features

  • Supports operations:
    • Addition +
    • Subtraction -
    • Multiplication *
    • Division /
    • Power ^
    • Percentage %
    • Square root sqrt
  • Commands:
    • history โ€” Show past calculations
    • clear โ€” Clear history
    • exit โ€” Quit the calculator
  • Saves history to a history.txt file

๐Ÿ–ฅ๏ธ How to Run

  1. Make sure Python is installed.
  2. Open a terminal in your project directory.
  3. Run the app:
  • python calculator.py

โœจ Examples

Addition

Enter operator or command: +
Enter numbers: 10 20 30
10 + 20 + 30 = 60

Square root

Enter operator or command: sqrt
Enter a number: 25
โˆš25 = 5

๐Ÿ“Œ Notes

  • ^ (power) and % (percentage) require exactly 2 numbers.
  • sqrt only accepts a single positive number.
  • All operations are rounded to 3 decimals if needed.
  • The history file can be excluded from version control using .gitignore.

๐Ÿ”ฎ Future Enhancements

Here are some features planned or suggested for future versions:

โœ… GUI Version using Tkinter

  • User-friendly interface with buttons and display

  • Input fields for numbers and operations

๐Ÿ“ƒ License

This project is free and open-source for personal, educational, or learning use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages