input: Write a python function to perform basic arithmetic operations based on user input.
  assert calculate(3, 5, "+") == 8
  assert calculate(10, 4, "-") == 6
  assert calculate(6, 7, "*") == 42
  assert calculate(8, 2, "/") == 4
output: def calculate(a, b, operation):
      if operation == "+":
          return a + b
      elif operation == "-":
          return a - b
      elif operation == "*":
          return a * b
      elif operation == "/":
          return a / b
      else:
          raise ValueError("Invalid operation")