https://github.com/optimized-brain/scientific-calculator
A Scientific Calculator with Graphing and advanced mathematical calculation capabilities
https://github.com/optimized-brain/scientific-calculator
advanced-mathematics customtkinter fourier-transform interactive-graphing latex-rendering mpmath ode-solver python scientific-calculator symbolic-math sympy
Last synced: 4 months ago
JSON representation
A Scientific Calculator with Graphing and advanced mathematical calculation capabilities
- Host: GitHub
- URL: https://github.com/optimized-brain/scientific-calculator
- Owner: Optimized-Brain
- Created: 2025-02-25T12:56:18.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T11:17:01.000Z (4 months ago)
- Last Synced: 2025-03-05T11:35:57.487Z (4 months ago)
- Topics: advanced-mathematics, customtkinter, fourier-transform, interactive-graphing, latex-rendering, mpmath, ode-solver, python, scientific-calculator, symbolic-math, sympy
- Language: Python
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scientific Calculator with Graphing and Advanced UI
This repository contains a Python-based scientific calculator application featuring a modern, dark-themed interface built using [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter). It supports evaluation of complex mathematical expressions, dynamic function graphing, custom shift mapping for digit buttons, and full keyboard input support.
## Features
- **Modern UI**: A sleek, dark-themed interface built with CustomTkinter.
- **Mathematical Evaluation**: Supports arithmetic operations, trigonometric functions (`sin`, `cos`, `tan`), logarithms (`log`, `ln`), exponentiation, square roots, and more.
- **Graphing Capabilities**: Dynamically plot functions (e.g., polynomials, trigonometric functions, exponentials) using Matplotlib.
- **Shift Mapping**: Digit buttons display an extra character (e.g., `7 (x)`) for shift mode. When shift is toggled on, pressing a digit inserts the corresponding letter instead.
- **Keyboard Input Support**: Use your keyboard to input expressions. Special keys:
- **Enter**: Evaluate the expression.
- **Backspace**: Delete the last character.
- **Escape**: Clear the current expression.
- **Dynamic Graph Options**: Specify the x-axis range and variable to plot the graph for any valid mathematical function.- 
## Installation
Ensure you have Python 3.x installed, then install the required packages:
```bash
pip install customtkinter mpmath numpy matplotlib sympy
```## Usage
1. **Clone the Repository:**
```bash
git clone https://github.com/Optimized-Brain/scientific-calculator.git
cd scientific-calculator
```2. **Run the Application:**
```bash
python calculator.py
```3. **Using the Calculator:**
- **Buttons:** Click on the on-screen buttons to build your expression. For digit buttons, the displayed text shows both the digit and its shift-mapped letter (e.g., `7 (x)`).
- **Shift Mode:** Toggle shift mode by clicking the "Shift On/Shift Off" button. When activated, pressing a digit will insert its mapped letter.
- **Keyboard Support:** You can also type on your keyboard:
- **Enter**: Evaluates the current expression.
- **Backspace**: Deletes the last character.
- **Escape**: Clears the expression.4. **Graphing Functions:**
- Build your function expression (e.g., `tan(x)`, `x**2 + 3*x + 2`, `sin(x)`).
- Click the **Graph** button or "ctrl+g" command.
- In the graph options window, set:
- **X min / X max:** The range for the x-axis.
- **Variable:** The variable in your expression (default is `x`).
- Click **Plot Graph** to display the function's graph.
## Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request if you have improvements, bug fixes, or new features.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---