input: Write a python function to create a simple calculator that can add, subtract, multiply, and divide two numbers based on user input.
  assert calculator("add", 10, 5) == 15
  assert calculator("subtract", 10, 5) == 5
  assert calculator("multiply", 10, 5) == 50
  assert calculator("divide", 10, 5) == 2.0
  assert calculator("divide", 10, 0) == "Cannot divide by zero"
output: def calculator(operation, num1, num2):
      if operation == "add":
          return num1 + num2
      elif operation == "subtract":
          return num1 - num2
      elif operation == "multiply":
          return num1 * num2
      elif operation == "divide":
          if num2 == 0:
              return "Cannot divide by zero"
          return num1 / num2
      else:
          return "Invalid operation"