Skip to content

A simple Python command-line calculator that supports basic and advanced operations like +, -, *, /, **, square root, modulus, and more.

Notifications You must be signed in to change notification settings

aarohidongarwar/Python-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🧮 Python Calculator

A simple yet powerful command-line calculator built in Python.
It performs both basic and advanced mathematical operations with clean input handling and looping features.


✨ Features

  • Basic arithmetic: +, -, *, /, **
  • Advanced functions:
    • sqrt → Square root
    • root → Any root (e.g., cube root)
    • abs → Absolute value
    • % → Modulus
    • all → Perform all operations at once
  • Validates operator input until correct
  • Handles divide-by-zero errors gracefully
  • Loops until the user chooses to exit

▶️ How to Run

  1. Make sure you have Python 3 installed.
  2. Download this repository or clone it using:
    git clone https://github.com/YOUR-USERNAME/Python-Calculator.git
  3. Run the file:
    python main.py

🧠 Example Output

Python Calculator
====================
Enter the first number: 5
Enter the second number: 2
Enter an operation (+, -, *, /, **, all, sqrt, root, abs, %): all
Performing all operations:
Addition: 7.0
Subtraction: 3.0
Multiplication: 10.0
Division: 2.5
Exponentiation: 25.0

👩‍💻 Author

Aarohi Dongarwar
B.Tech CSE (Data Science) Student
📍 Nagpur, India


If you like this project, give it a star!

About

A simple Python command-line calculator that supports basic and advanced operations like +, -, *, /, **, square root, modulus, and more.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages