Add repeatable calculator startup script

This commit is contained in:
venomade committed 2026-10-26 11:26:11 +00:00
1 parent 932e4a2e05
commit f0c0ccc012
2 files changed
+6 -1

No files matched your search

+2 -1
View File
@@ -6,10 +6,11 @@ It will run on `Python 3` via the `calculator.py` script.
Add, subtract, multiply and divide two numbers; display the result. Add, subtract, multiply and divide two numbers; display the result.
## How to Run It ## How to Run It
Run: `python3 calculator.py` Run: `./run.sh`
## Usage ## Usage
- First enter a number - First enter a number
- Then enter an operator (`+`,`-`,`*` or `/`) - Then enter an operator (`+`,`-`,`*` or `/`)
- Lastly enter a second number - Lastly enter a second number
- Read the result, printed as `Result: ` followed by the answer. - Read the result, printed as `Result: ` followed by the answer.
- When done stop with `Ctrl+c`
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
set -e
cd -- "$(dirname -- "$0")"
python3 calculator.py