Professional Python calculator featuring both CLI and modern GUI interfaces. Built with NumPy for precise scientific calculations and CustomTkinter for a sleek, responsive user experience.
๐ข Perfect for learning Python GUI development, numerical computing, and software design patterns
Features โข Demo โข Quick Start โข Usage โข Operations
- ๐ Project Overview
- โจ Features
- ๐ฌ Demo & Preview
- ๐ง Tech Stack
- ๐ฆ Installation
- ๐ Quick Start
- ๐ป Usage Guide
- ๐ข Supported Operations
- โ๏ธ Configuration
- ๐จ Customization
- ๐๏ธ Architecture
- ๐ Troubleshooting
- ๐ Future Enhancements
- ๐ค Contributing
- ๐ License
|
Dual Interface CLI & GUI modes Flexible usage |
Scientific Ops 9+ operations NumPy precision |
Clean Code Modular design Separation of concerns |
Modern UI CustomTkinter Responsive layout |
A professional scientific calculator with dual interface support - both command-line and modern GUI. Built to demonstrate clean Python architecture, numerical computing with NumPy, and modern GUI design with CustomTkinter.
|
For Learning:
|
For Projects:
|
| Category | Features |
|---|---|
| ๐ข Basic Operations |
โ
Addition (+) โ Subtraction (โ) โ Multiplication (ร) โ Division (รท) โ Parentheses support ( ) โ Decimal point precision |
| ๐ฌ Scientific Functions |
โ
Power (x^y) โ Square root (โx) โ Cube root (โx) โ Logarithm base 10 (logโโ) โ Natural logarithm (ln) โ High precision computation |
| ๐ฅ๏ธ GUI Interface |
โ
Modern CustomTkinter design โ Responsive button layout โ Real-time expression display โ Clear and backspace functions โ Color-coded operators โ Smooth hover effects |
| โจ๏ธ CLI Interface |
โ
Interactive menu system โ Color-coded output โ Formatted results display โ Operation selection (1-9) โ Continuous calculation mode โ Graceful exit handling |
| ๐ก๏ธ Error Handling |
โ
Division by zero protection โ Invalid input detection โ Negative root handling โ Logarithm domain validation โ Expression syntax checking โ User-friendly error messages |
| ๐จ Customization |
โ
Dynamic appearance mode (Light/Dark) โ Custom color themes โ Resizable window โ Configurable button styles โ Adjustable fonts and sizes โ Easy theme switching |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Calculator โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 123 + 456 โ Display โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ ( โ โ ) โ โ C โ โ โซ โ โ ร โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ 7 โ โ 8 โ โ 9 โ โ รท โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ 4 โ โ 5 โ โ 6 โ โ โ โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ 1 โ โ 2 โ โ 3 โ โ + โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ 0 โ โ00 โ โ . โ โ = โ โ
โ โโโโโ โโโโโ โโโโโ โโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
=============== Calculator ===============
Select operation :
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Power (x^y)
6. Square Root
7. Cube Root
8. Logarithm (base 10)
9. Natural Logarithm (ln)
Enter choice (1-9) :
โ
You choose to 'Add'
Enter first number : 25
Enter second number : 75
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Sum is = 100.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Press Enter to calculate again
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User Interface Layer โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โ
โ โ CLI Interface โ โ GUI Interface โ โ
โ โ (calculator.py)โ โ(Calculator_GUI.py)โ โ
โ โโโโโโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโโโ โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Computation Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Python eval() / NumPy Functions โ โ
โ โ โข Basic arithmetic (+ - ร รท) โ โ
โ โ โข Scientific operations (โ, โ, log, ln) โ โ
โ โ โข Expression evaluation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Error Handling โ
โ โข Division by zero โ
โ โข Invalid expressions โ
โ โข Domain errors (negative roots, log of negatives) โ
โ โข Syntax errors โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
Python 3.8+ Core language |
NumPy Scientific computing |
Built-in Libraries Math, eval |
CustomTkinter Modern GUI |
| Component | Technology | Purpose |
|---|---|---|
| GUI Framework | CustomTkinter | Modern, themed Tkinter widgets |
| Scientific Math | NumPy | sqrt, cbrt, log, log10 functions |
| Expression Eval | Python eval() | Dynamic expression evaluation |
| CLI Output | ANSI Escape Codes | Colored terminal output |
| Error Handling | Try-Except Blocks | Robust error management |
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.8 | 3.9 - 3.11 |
| RAM | 512 MB | 1 GB+ |
| Disk Space | 50 MB | 100 MB+ |
| OS | Windows 7+, macOS 10.12+, Linux (any modern distro) | |
# Required Dependencies
numpy>=1.24.0 # Scientific computations
customtkinter>=5.0.0 # Modern GUI (for GUI version only)
# Standard Library (Built-in)
math # Basic mathematical functions
tkinter # GUI toolkit (usually pre-installed)git clone https://github.com/your-username/scientific-calculator.git
cd scientific-calculator|
Windows: python -m venv venv
venv\Scripts\activate |
macOS/Linux: python -m venv venv
source venv/bin/activate |
For CLI Calculator Only:
pip install numpyFor Both CLI and GUI:
pip install numpy customtkinterOr use requirements file:
pip install -r requirements.txtVerify installation:
python -c "import numpy, customtkinter; print('All dependencies installed!')"CLI Version (Command Line):
python calculator.pyGUI Version (Graphical Interface):
python Calculator_GUI.pyFeatures:
- ๐ Interactive menu with 9 operations
- ๐จ Color-coded output for better readability
- ๐ Continuous calculation mode
- โ Error handling with clear messages
Usage Flow:
1. Run: python calculator.py
2. Select operation number (1-9)
3. Enter required numbers
4. View result
5. Press Enter to calculate again
6. Press any other key + Enter to exit
Example Session:
$ python calculator.py
Select operation :
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Power (x^y)
6. Square Root
7. Cube Root
8. Logarithm (base 10)
9. Natural Logarithm (ln)
Enter choice (1-9) : 5
You choose to 'Check Exponential value'
Enter base : 2
Enter exponent : 10
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Exponential value is = 1024.0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Press Enter to calculate againFeatures:
- ๐ฑ๏ธ Click buttons or use keyboard
- ๐ฑ Responsive, resizable window
- ๐จ Modern dark theme with green accents
- โซ Backspace for corrections
- ๐ Clear button to reset
Usage:
1. Run: python Calculator_GUI.py
2. Click number buttons or type directly
3. Click operation buttons (+, -, ร, รท)
4. Use parentheses ( ) for complex expressions
5. Press = to calculate result
6. Use C to clear, โซ to backspace
Keyboard Shortcuts:
0-9- Enter numbers+-*/- Operators()- Parentheses.- Decimal pointEnter- Calculate (=)Escape- Clear (C)Backspace- Delete last character
Example Expressions:
Simple: 25 + 75 = 100
Complex: (10 + 5) * 2 = 30
Decimal: 3.14 * 2 = 6.28
Nested: ((5 + 3) * 2) - 4 = 12
| Operation | Choice | Syntax | Example | Result |
|---|---|---|---|---|
| Addition | 1 | a + b | 25 + 75 | 100 |
| Subtraction | 2 | a - b | 100 - 42 | 58 |
| Multiplication | 3 | a ร b | 12 ร 8 | 96 |
| Division | 4 | a รท b | 50 รท 2 | 25 |
| Power | 5 | a^b | 2^10 | 1024 |
| Square Root | 6 | โa | โ144 | 12 |
| Cube Root | 7 | โa | โ27 | 3 |
| Logarithm (base 10) | 8 | logโโ(a) | logโโ(100) | 2 |
| Natural Logarithm | 9 | ln(a) | ln(e) | 1 |
| Button | Function | Example |
|---|---|---|
| 0-9 | Number input | Press '5' โ displays '5' |
| 00 | Double zero | Quick entry of '00' |
| . | Decimal point | 3.14, 2.5, 0.001 |
| + | Addition | 5 + 3 = 8 |
| โ | Subtraction | 10 - 4 = 6 |
| ร | Multiplication | 7 ร 8 = 56 |
| รท | Division | 20 รท 4 = 5 |
| ( ) | Parentheses | (5 + 3) ร 2 = 16 |
| = | Calculate result | Evaluates expression |
| C | Clear all | Resets display |
| โซ | Backspace | Deletes last character |
| Error Type | Condition | Message/Behavior |
|---|---|---|
| Division by Zero | x รท 0 | "Error! Division by zero." (CLI) "Error" (GUI) |
| Negative Square Root | โ(-x) | "Square root of negative number not possible" |
| Negative Cube Root | โ(-x) | "Cube root of negative number not possible" |
| Invalid Logarithm | log(0) or log(-x) | "Logarithm not defined for non-positive numbers" |
| Invalid Expression | Syntax error | "Error" displayed, expression cleared |
Modify in Calculator_GUI.py:
# Appearance Mode: "light", "dark", or "system" (follows OS)
ctk.set_appearance_mode("dark") # Change to "light" for light mode
# Color Theme: "blue", "green", or "dark-blue"
ctk.set_default_color_theme("green") # Change to "blue" for blue accent
# Window Configuration
app.geometry("420x500") # Width x Height
app.resizable(width=True, height=True) # Allow resizing# Number Buttons (Gray)
fg_color="#444" # Button background
hover_color="#555" # Hover effect
# Operator Buttons (Orange)
fg_color="#ff9f0a" # Bright orange
hover_color="#e68900" # Darker on hover
# Button Dimensions
width=80 # Button width in pixels
height=70 # Button height in pixels
corner_radius=15 # Rounded corners
# Font Settings
font=("Helvetica", 18) # Font family and size# Entry Widget (Display)
width=400 # Display width
height=50 # Display height
font=("Helvetica", 28) # Font size
justify="center" # Text alignment: "left", "center", "right"ANSI Color Codes in calculator.py:
# Color Codes
\033[34m # Blue (for prompts)
\033[32m # Green (for results)
\033[33m # Yellow (for hints)
\033[35m # Magenta (for goodbye)
\033[3m # Italic
\033[0m # Reset formatting
# Example: Change result color from green to cyan
print(f"Result = \033[36m {result} \033[0m") # CyanDisable Colors (for unsupported terminals):
# Remove all \033[...m codes for plain text output
print(f"Result = {result}")๐ข Add More Scientific Functions
In CLI (calculator.py):
# Add trigonometric functions
elif choice == 10:
print("You choose to 'Calculate Sine'")
a = float(input("\nEnter angle in degrees: "))
print(f"sin({a}ยฐ) = {np.sin(np.radians(a)):.4f}")
elif choice == 11:
print("You choose to 'Calculate Cosine'")
a = float(input("\nEnter angle in degrees: "))
print(f"cos({a}ยฐ) = {np.cos(np.radians(a)):.4f}")
elif choice == 12:
print("You choose to 'Calculate Tangent'")
a = float(input("\nEnter angle in degrees: "))
print(f"tan({a}ยฐ) = {np.tan(np.radians(a)):.4f}")
# Add factorial
elif choice == 13:
print("You choose to 'Calculate Factorial'")
n = int(input("\nEnter positive integer: "))
if n >= 0:
print(f"{n}! = {np.math.factorial(n)}")In GUI (Calculator_GUI.py):
# Add scientific function buttons
buttons_scientific = [
("sin", 1, 6, lambda: press("np.sin(np.radians(")),
("cos", 2, 6, lambda: press("np.cos(np.radians(")),
("tan", 3, 6, lambda: press("np.tan(np.radians(")),
("โ", 4, 6, lambda: press("np.sqrt(")),
("ฯ", 5, 6, lambda: press(str(np.pi))),
("e", 6, 6, lambda: press(str(np.e))),
]๐ Add Calculation History
class CalculatorHistory:
def __init__(self):
self.history = []
self.max_size = 50
def add_calculation(self, expression, result):
"""Add calculation to history"""
self.history.append({
'expression': expression,
'result': result,
'timestamp': datetime.now()
})
if len(self.history) > self.max_size:
self.history.pop(0)
def get_history(self, n=10):
"""Get last n calculations"""
return self.history[-n:]
def clear_history(self):
"""Clear all history"""
self.history = []
def save_to_file(self, filename='calc_history.txt'):
"""Save history to file"""
with open(filename, 'w') as f:
for calc in self.history:
f.write(f"{calc['timestamp']}: {calc['expression']} = {calc['result']}\n")
# Usage
history = CalculatorHistory()
# In calculate() function
result = eval(expression)
history.add_calculation(expression, result)๐จ Create Custom Themes
# Define theme dictionaries
THEMES = {
'dark': {
'bg': '#1e1e1e',
'fg': '#ffffff',
'button_bg': '#333333',
'button_hover': '#555555',
'operator_bg': '#ff9f0a',
'operator_hover': '#e68900'
},
'light': {
'bg': '#ffffff',
'fg': '#000000',
'button_bg': '#e0e0e0',
'button_hover': '#d0d0d0',
'operator_bg': '#007aff',
'operator_hover': '#0051d5'
},
'ocean': {
'bg': '#0d1b2a',
'fg': '#e0e1dd',
'button_bg': '#1b263b',
'button_hover': '#415a77',
'operator_bg': '#00d9ff',
'operator_hover': '#00b8d4'
},
'sunset': {
'bg': '#2d1b00',
'fg': '#fff8dc',
'button_bg': '#5c3d00',
'button_hover': '#8b5e00',
'operator_bg': '#ff6b35',
'operator_hover': '#e85d2e'
}
}
def apply_theme(theme_name):
"""Apply selected theme"""
theme = THEMES.get(theme_name, THEMES['dark'])
# Apply colors to widgets
# ... update all widget colorsโจ๏ธ Add Keyboard Shortcuts
def on_key_press(event):
"""Handle keyboard input"""
key = event.char
if key.isdigit() or key in '+-*/.()':
press(key)
elif event.keysym == 'Return':
calculate()
elif event.keysym == 'Escape':
clear()
elif event.keysym == 'BackSpace':
backspace()
# Bind keyboard events
app.bind('<Key>', on_key_press)๐พ Save/Load Expressions
def save_expression():
"""Save current expression to file"""
filename = ctk.filedialog.asksaveasfilename(
defaultextension=".txt",
filetypes=[("Text files", "*.txt"), ("All files", "*.*")]
)
if filename:
with open(filename, 'w') as f:
f.write(expression)
def load_expression():
"""Load expression from file"""
global expression
filename = ctk.filedialog.askopenfilename(
filetypes=[("Text files", "*.txt"), ("All files", "*.*")]
)
if filename:
with open(filename, 'r') as f:
expression = f.read()
equation.set(expression)
# Add buttons
save_btn = ctk.CTkButton(app, text="Save", command=save_expression)
load_btn = ctk.CTkButton(app, text="Load", command=load_expression)๐ Add Scientific Mode Toggle
class ScientificCalculator:
def __init__(self):
self.mode = 'basic' # 'basic' or 'scientific'
def toggle_mode(self):
"""Switch between basic and scientific mode"""
if self.mode == 'basic':
self.mode = 'scientific'
self.show_scientific_buttons()
else:
self.mode = 'basic'
self.hide_scientific_buttons()
def show_scientific_buttons(self):
"""Show additional scientific function buttons"""
# sin, cos, tan, log, ln, ฯ, e, etc.
pass
def hide_scientific_buttons(self):
"""Hide scientific buttons"""
passscientific-calculator/
โ
โโโ ๐ calculator.py # CLI Calculator
โ โโโ Menu system (1-9 operations)
โ โโโ NumPy scientific functions
โ โโโ Color-coded output (ANSI)
โ โโโ Error handling
โ โโโ Continuous calculation loop
โ
โโโ ๐ Calculator_GUI.py # GUI Calculator
โ โโโ CustomTkinter interface
โ โโโ Button grid layout (7x6)
โ โโโ Expression evaluation
โ โโโ Real-time display update
โ โโโ Event handlers (press, clear, backspace)
โ โโโ Styling and theming
โ
โโโ ๐ requirements.txt # Dependencies
โ โโโ numpy>=1.24.0
โ โโโ customtkinter>=5.0.0
โ
โโโ ๐ README.md # Documentation
โ
โโโ ๐ LICENSE # MIT License
CLI Calculator Flow:
Start
โ
โผ
Display Menu (1-9)
โ
โผ
Get User Choice
โ
โ--โ Choice 1-5: Get 2 numbers
โ โ--โ Perform operation
โ โ--โ Display result
โ
โ--โ Choice 6-9: Get 1 number
โ โ--โ Validate (negative check for roots, log)
โ โ--โ Perform operation
โ โ--โ Display result
โ
โ--โ Invalid: Show error
โ
โผ
Ask to Continue
โ
โ--โ Enter pressed: Loop back to menu
โ--โ Any key: Exit with goodbye
GUI Calculator Flow:
Initialize GUI
โ
โผ
Display Window
โ
โ--โ Button Click Event
โ โ--โ Number/Operator: Append to expression
โ โ--โ Clear: Reset expression
โ โ--โ Backspace: Remove last char
โ โ--โ Equals: Evaluate expression
โ โ--โ Valid: Display result
โ โ--โ Error: Display "Error"
โ
โ--โ Keep window open (mainloop)
| Pattern | Implementation | Benefit |
|---|---|---|
| Separation of Concerns | Separate CLI and GUI interfaces | Modular, maintainable code |
| Event-Driven | Button callbacks, event handlers | Responsive UI, clean flow |
| Error Handling | Try-except blocks, validation | Robust, user-friendly |
| Function Composition | Helper functions (press, clear, calculate) | Reusable, testable code |
โ Module Not Found: customtkinter
Symptoms:
ModuleNotFoundError: No module named 'customtkinter'
Solutions:
-
Install CustomTkinter:
pip install customtkinter
-
Verify Installation:
pip list | grep customtkinter -
Use Virtual Environment:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows pip install customtkinter
-
Alternative: Use Standard Tkinter: If CustomTkinter doesn't work, modify code to use standard Tkinter:
import tkinter as tk # Replace ctk with tk
๐ฅ๏ธ GUI Window Not Appearing
Symptoms:
- Script runs but no window shows
- Window appears then immediately closes
Solutions:
-
Check Display Environment (Linux):
echo $DISPLAY # Should output something like :0 or :1
-
Test Tkinter Installation:
python -c "import tkinter; tkinter.Tk()" # Should show empty window
-
macOS: Grant Terminal Access:
- System Preferences โ Security & Privacy
- Allow Terminal to control computer
-
Windows: Update Graphics Drivers
-
Add Error Handling:
try: app = ctk.CTk() app.mainloop() except Exception as e: print(f"GUI Error: {e}")
๐ข Calculation Errors in GUI
Symptoms:
- "Error" displayed frequently
- Unexpected results
Solutions:
-
Check Expression Syntax:
- Ensure balanced parentheses
- Use
*for multiplication (notร) - Avoid starting with operators
-
Division by Zero:
# Add check before eval if '/0' in expression or 'รท0' in expression: equation.set("Cannot divide by zero") return
-
Add Expression Validation:
def is_valid_expression(expr): """Check if expression is valid""" try: # Check balanced parentheses if expr.count('(') != expr.count(')'): return False # Test evaluation without executing compile(expr, '<string>', 'eval') return True except: return False
-
Safe Eval:
import ast import operator # Use safer eval with limited operators safe_operators = { ast.Add: operator.add, ast.Sub: operator.sub, ast.Mult: operator.mul, ast.Div: operator.truediv, ast.Pow: operator.pow, }
๐จ Colors Not Displaying (CLI)
Symptoms:
- ANSI codes visible as text
- No colored output in terminal
Solutions:
-
Windows: Enable ANSI Support:
import os os.system('color') # Enable ANSI in Windows CMD
-
Use colorama (cross-platform):
pip install colorama
from colorama import init, Fore, Style init() # Initialize colorama print(f"{Fore.GREEN}Result = {result}{Style.RESET_ALL}")
-
Disable Colors:
# Remove all \033[...m codes print(f"Result = {result}") # Plain text
โ ๏ธ NumPy Import Errors
Symptoms:
ModuleNotFoundError: No module named 'numpy'
ImportError: numpy.core.multiarray failed to import
Solutions:
-
Install NumPy:
pip install numpy
-
Upgrade NumPy:
pip install --upgrade numpy
-
Check Python Version:
python --version # NumPy requires Python 3.8+ -
Reinstall NumPy:
pip uninstall numpy pip install numpy
| Feature | Description | Status |
|---|---|---|
| ๐ข Complete Scientific Functions | Add sin, cos, tan, asin, acos, atan | ๐ Planned |
| ๐ Graphing Calculator | Plot functions and equations | ๐ Planned |
| ๐ Calculation History | Save and view past calculations | ๐ Planned |
| ๐ข Unit Converter | Convert between units (length, weight, etc.) | ๐ก Idea |
| ๐จ Theme Selector | Multiple color themes to choose from | ๐ก Idea |
| ๐ฑ Mobile App | Port to iOS/Android with Kivy | ๐ก Idea |
| ๐ Voice Input | Speak mathematical expressions | ๐ก Idea |
| ๐ Geometry Tools | Area, perimeter, volume calculations | ๐ก Idea |
| ๐ Statistics Mode | Mean, median, standard deviation | ๐ก Idea |
| ๐ API Integration | Wolfram Alpha or Symbolab integration | ๐ก Idea |
Contributions are welcome! Help improve this calculator:
|
Report Bugs Found an issue? Open an issue |
Suggest Features Have an idea? Share it! |
Submit Code Add features? Send a PR |
Improve Docs Better explanation? Update README |
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/scientific-calculator.git cd scientific-calculator - Create a feature branch:
git checkout -b feature/new-function
- Make your changes
- Test thoroughly (CLI and GUI)
- Commit with clear messages:
git commit -m 'Add trigonometric functions' - Push to your fork:
git push origin feature/new-function
- Open a Pull Request
- โ Follow PEP 8 for Python code
- โ Use descriptive variable names
- โ Add comments for complex logic
- โ Include docstrings for functions
- โ Test with various inputs
- โ Update documentation for new features
This project is licensed under the MIT License
Free to use, modify, and distribute with attribution
Click to view full license
MIT License
Copyright (c) 2025 Scientific Calculator Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Special thanks to:
- ๐ Python Software Foundation for the amazing language
- ๐ข NumPy Developers for scientific computing tools
- ๐จ CustomTkinter for modern GUI widgets
- ๐ฅ Open Source Community for inspiration and support
- ๐ You for using and supporting this project!
|
Documentation Complete README Guide Setup & troubleshooting |
Code Comments In-line Documentation Implementation details |
Refer to the troubleshooting section above for common issues and solutions
If this project helped you, please consider:
โญ Star this repository if you found it helpful!
๐ด Fork it to customize for your needs!
๐ข Share it with Python learners!