A desktop calculator application written in Python with a PyQt GUI. It combines a basic and scientific calculator with a handy unit converter (length, mass, temperature, time).
Calculator focuses on quick everyday calculations while also offering advanced math functions and a clean, keyboard-friendly UI. The built‑in converter covers the most common unit categories so you don’t need a separate tool.
- Basic calculator: addition, subtraction, multiplication, division, parentheses
- Scientific mode: powers, roots, common trigonometric functions, logarithms
- Unit converter: length, mass, temperature, and time
- Clear, responsive UI optimized for desktop use
Tip: Exact button labels and the full set of scientific functions depend on the implementation—this README describes the intent of each module.
- Python 3.x
- PyQt (PyQt5/6 depending on
requirements.txt
) - (Optional) Qt Designer for editing
.ui
files
Calculator/
├─ main.py # Application entry point
├─ classes/ # Core logic (operations, conversions)
├─ gui/ # UI layer (Qt widgets / .ui files)
├─ build/ # (optional) build artifacts
└─ requirements.txt # Python dependencies
Folder names may vary slightly; the structure above reflects the intended separation of concerns.
- Clone the repository
git clone https://github.com/GingerCRO/Calculator.git
cd Calculator
- Create and activate a virtual environment (recommended)
# Windows (PowerShell)
py -m venv .venv
.venv\Scripts\Activate.ps1
# macOS / Linux
python3 -m venv .venv
source .venv/bin/activate
- Install dependencies
pip install -r requirements.txt
# Windows
py main.py
# macOS / Linux
python3 main.py
- Choose the desired module from the UI: Basic, Advanced/Scientific, or Converter.
- In Converter, select a category (length/mass/temperature/time), choose From and To units, and enter a value.
- In Calculator, use on‑screen buttons or your keyboard; press = (or Enter) to evaluate.
- Basic:
2 + 2 = 4
,10 / 4
,3 * (5 - 2)
- Scientific:
√9
,2^8
,sin(π/2)
,log10(100)
- Converter: check typical conversions (e.g.,
m ↔ km
,kg ↔ g
,°C ↔ °F
,s ↔ min
)
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature
- Commit:
git commit -m "Add your feature"
- Push:
git push origin feature/your-feature
- Open a Pull Request
Using PyInstaller:
pip install pyinstaller
pyinstaller --name Calculator --onefile --windowed main.py
Artifacts will be available in the dist/
directory.
This project is released under the MIT License. See the LICENSE
file for details.
Thanks to the open‑source community and the PyQt ecosystem for tools and inspiration.