A terminal-based geometric area calculator written in Python.
PyGeoterm is a lightweight command-line tool that allows users to calculate the area of common geometric shapes directly from the terminal. It is designed to be simple, interactive, and accessible to anyone who needs quick geometric computations without relying on external tools or graphical interfaces.
- Calculate the area of seven geometric shapes:
- Square
- Rectangle
- Triangle
- Circle
- Parallelogram
- Trapezoid
- Rhombus
- Color-coded terminal output for better readability
- Built-in error handling with descriptive error codes
- Interactive session with reset and exit options
- No external dependencies beyond the Python standard library
- Python 3.x
Clone the repository:
git clone https://github.com/MultiRight/PyGeoterm.git
cd PyGeotermRun the script with Python:
python PyGeoterm.pyTip: If
pythondoes not work, try:python3 PyGeoterm.py
Once launched, follow the on-screen prompts to select a geometric shape and enter the required dimensions. The program will output the calculated area.
To display the help information:
--helpAt the end of each session, type r to restart or q to quit the program.
| Code | Description |
|---|---|
| err101 | Invalid input — letters or symbols were entered instead of numbers |
| err102 | Invalid shape — the selected choice is not in the geometric menu |
| err103 | Invalid action — the input is neither r or q |
This project is licensed under the GNU General Public License v3.0.
MultiRight GitHub: https://github.com/MultiRight
Repository: https://github.com/MultiRight/PyGeoterm
Copyright (C) 2026 MultiRight https://github.com/MultiRight
A special thanks to mimi — the legendary, the great, the gentle cat.