A tiny command-line math utility written in Python that supports four operations:
- add
- sub
- mul
- div
Install (optional) and run:
python simple_math.py add 3 4
python simple_math.py sub 10 7
python simple_math.py mul 6 8
python simple_math.py div 10 2Examples:
$ python simple_math.py add 2 3
5
$ python simple_math.py div 7 2
3.5Exit codes:
- 0 on success
- non-zero on error (e.g., division by zero)
simple_math.py— main script
Choose a license (MIT recommended). If you'd like, I can add a LICENSE file for you.