A Python-based command-line calculator that supports basic arithmetic, advanced operations, binary logic, comparisons, and even a practice quiz mode for learning math interactively.
This project is written entirely in Python and demonstrates the use of functions, error handling, user input, and randomization.
- Basic Arithmetic: Addition, subtraction, multiplication, division, modulo, power, integer division, square root, absolute value.
- Binary Operations: AND, OR, XOR, NOT AND (~a & b).
- Comparisons: Greater than, less than, greater/less or equal.
- Average: Quickly compute the mean of two numbers.
- Practice Quiz Mode : Solve randomly generated math problems (+, −, ×, ÷) and get scored.
- Run the program.
- Choose an operation from the menu.
- Input one or two numbers (depending on the operation).
- Get the result instantly.
- Type
7for practice mode orexitto quit.
- Python 3.7+
- No external libraries needed (only built-in
mathandrandommodules are used).
Clone the repository and run the program:
git clone https://github.com/thanos-coder2/math-multitool-python.git
cd math-multitool
python multitool.py