''' You have to use the following template to submit to Revel. Note: To test the code using the CheckExerciseTool, you will submit entire code. To submit your code to Revel, you must only submit the code enclosed between # BEGIN REVEL SUBMISSION # END REVEL SUBMISSION ''' class Stack: def __init__(self): self.__elements = [] # Return true if the stack is empty def isEmpty(self): return len(self.__elements) == 0 # Returns the element at the top of the stack # without removing it from the stack. def peek(self): if self.isEmpty(): return None else: return self.__elements[len(self.__elements) - 1] # Stores an element into the top of the stack def push(self, value): self.__elements.append(value) # Removes the element at the top of the stack and returns it def pop(self): if self.isEmpty(): return None else: return self.__elements.pop() # Return the size of the stack def getSize(self): return len(self.__elements) def main(): expression = input("Enter an expression: ").strip() try: print(expression, "=", evaluateExpression(expression)) except: print("Wrong expression: ", expression) # BEGIN REVEL SUBMISSION # Evaluate an expression # Write Your Code Here # END REVEL SUBMISSION