A comprehensive scientific calculator built with Python that supports advanced mathematical operations including calculus, linear algebra, and more.
- ➕ Addition, Subtraction, Multiplication, Division
- 🔢 Modulo operations
- 📊 Absolute value
- 🔢 Factorial calculations
- 🔺 Trigonometric functions (sin, cos, tan, cot)
- 🔄 Inverse trigonometric functions (arcsin, arccos, arctan, arccot)
- 📈 Logarithmic functions (natural log, common log)
- ⚡ Exponential functions
- 🌟 Power and root calculations
- 📐 Derivatives calculation
- ∫ Integration (definite and indefinite)
- 🎯 Equation solving
- 🔢 Permutations and combinations
- ➕ Matrix addition and subtraction
- ✖️ Matrix multiplication
- 🔄 Matrix transpose
- 📊 Determinant calculation
- 🎯 Matrix trace
- ↩️ Matrix inverse
- 📝 Operation logging to file
- 🛡️ Comprehensive error handling
- 🎨 User-friendly menu interface
- 📋 Mathematical input validation
- Clone the repository:
git clone https://github.com/ereny84/scientific-calculator.git
cd scientific-calculator- Install required dependencies:
pip install sympy- Run the calculator:
python calculator.py- Python 3.7+
- sympy library
- math (built-in)
- sys (built-in)
- time (built-in)
Run the program and select from 27 different mathematical operations:
Scientific Calculator
0. Quit
1. Addition (+)
2. Subtraction (-)
3. Multiplication (x)
4. Division (/)
5. Mod (%)
...
27. Matrix Calculations
All operations are logged to calculator.txt for history tracking.
The calculator includes comprehensive error handling for:
- Invalid number inputs
- Division by zero
- Domain errors (e.g., negative numbers in even roots)
- Matrix dimension mismatches
- Overflow errors for large calculations
calculator.py- Main calculator programcalculator.txt- Operation history logREADME.md- This documentation
Feel free to fork this project and submit pull requests for improvements!
This project is open source and available under the MIT License.