Skip to content

hasan1369sh/Python-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

🧮 Python Calculator

A simple yet powerful command-line calculator built with Python. It supports basic arithmetic operations as well as advanced math functions like square root, power, and logarithms.

✨ Features

  • ✅ Basic operations: Addition, Subtraction, Multiplication, Division
  • 🔢 Advanced math: Power, Square Root, Logarithm (base 10 and natural)
  • 🛡️ Input validation and error handling (e.g., division by zero)
  • 🔁 Continuous mode – perform multiple calculations without restarting
  • 📂 Ready for extension (easy to add new functions or save history)

🖥️ How to Run

  1. Make sure you have Python 3.7 or higher installed.
  2. Clone this repository:
    git clone https://github.com/hasan1369sh/Python-Calculator.git
    
  3. Navigate to the project folder: cd Python-Calculator
  4. Run the calculator: python calculator.py

Example Usage : 🧮 Welcome to the Python Calculator!

--- Calculator Menu ---

  1. Add (+)
  2. Subtract (-)
  3. Multiply (*)
  4. Divide (/)
  5. Power (x^y)
  6. Square Root (√x)
  7. Logarithm (log10)
  8. Natural Log (ln)
  9. Exit

Choose an operation (1-9): 5 Enter the base number: 4 Enter the exponent: 3 ✅ Result: 4 ^ 3 = 64.0

👤 Author 👤 Hassan SHerafat 📧 hasansherafat5172@gmail.com 🔗 GitHub Profile : https://github.com/hasan1369sh/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages