A lightweight, feature-rich calculator for algebraic expressions and equations built with Python and Tkinter. This project offers a dual approach:
-
A lightweight remote version (
calcu_main.py
) that fetches the core code from the internet. -
A local customizable version (
calcu.py
) for offline use or code modifications.
- Solve algebraic expressions and equations.
- Preprocesses user input to handle implicit multiplications (e.g.,
2x
→2*x
). - Supports symbolic variable definitions using the
sympy
library. - Toggle between light mode and dark mode themes.
- Maintains a history of up to 10 calculations.
- Simple, user-friendly graphical interface built with Tkinter.
This project is still a work in progress and may contain bugs. Some known issues include:
- Unexpected behavior with certain edge-case algebraic inputs.
- Limited error handling for complex symbolic equations.
Feel free to report any bugs or suggest improvements via the Issues page on GitHub.
Make sure you have Python 3 installed on your system. Additionally, install the required dependencies:
pip install sympy
If you prefer minimal local code and have internet access, run the following:
python3 calcu_main.py
This script fetches the calculator logic from the internet, keeping your local setup clean and lightweight.
For offline use or if you want to modify the code:
python3 calcu.py
This script provides the full calculator interface and runs completely offline.
calcu_main.py
: Lightweight version fetching the core code from the internet.calcu.py
: Full local version with the complete code for customization.
- Expression Evaluation: Handles expressions like
2x + 3y - 4
or equations like2x + 3y = 10
. - Preprocessing: Automatically adjusts user input for implicit multiplication.
- History Management: Stores the last 10 calculations for reference.
- Themes: Switch between light and dark modes for better usability.
This project is licensed under the Apache License 2.0.
Feel free to contribute! Fork this repository, make your changes, and open a pull request.
Created by Hadi Raza.