A tutorial that my teacher linked shows 9 7 - 2 / being invalid, but I don't see how it is.
My thought process:
After 9, 7 is read in, stack is:
- is read in, 9 and 7 is popped off, and 9 - 7 is pushed in:
The 2 after - is read in and pushed in:
/ is read in, leading to both 2's being popped off and 2/2 to be pushed in:
The tutorial shows that right after 9 -7 is calculated, two numbers are attempted to be popped off the stack, leading to an error because the stack currently only has 1 number in it. Am I doing something wrong?