# Fifth Stack A simple stack-based language called Fifth ## Usage ```shell python fifth_stack.py ``` ### Commands - `PUSH ` - push integer onto stack - `POP` - remove top element - `SWAP` - swap top two elements - `DUP` - duplicate top element - `+`, `-`, `*`, `/` - arithmetic operations - `EXIT` - quit ### Example ``` stack is [] PUSH 3 stack is [3] PUSH 11 stack is [3, 11] + stack is [14] DUP stack is [14, 14] PUSH 2 stack is [14, 14, 2] * stack is [14, 28] SWAP stack is [28, 14] / stack is [2] + ERROR: two numbers required POP stack is [] EXIT ``` ## Tests ```bash pip install pytest pytest -v test_fifth_stack.py ``` ## Requirements - Python 3.10+ - pytest