1.[20 marks] Postfix expressions are incredibly easy to evaluate using a stack. To solve an expression, there are three things to know as you read a post-fix expression from left to right:

1.If you see a number, push it on the stack.

2.If you see an operator, pop the stack (twice) and apply the operator to what you just popped and then push the result.

3.When you reach the end of the expression there should be one thing on the stack – the solution.  

(postfix ‘(1 2 + 3 *)) → 9

(postfix ‘(3 4 5 + +)) → 12

You will need to use the eval function to apply the operator. Ensure you test your code on a wide variety of expressions.