code: def calc(n2, n1, operator):
      
      if operator == '-': return n1 - n2
      elif operator == '+': return n1 + n2
      elif operator == '*': return n1 * n2
      elif operator == '/': return n1 / n2
      elif operator == '^': return n1 ** n2
      return 0
docs: Calculate operation result
  
      n2 Number: Number 2
      n1 Number: Number 1
      operator Char: Operation to calculate