input: Write a function to perform basic arithmetic operations like addition, subtraction, multiplication, and division.
  assert calculator(10, 5, '+') == 15
  assert calculator(10, 5, '-') == 5
  assert calculator(10, 5, '*') == 50
  assert calculator(10, 5, '/') == 2.0
  assert calculator(10, 5, '%') == None
output: def calculator(a, b, operation):
      if operation == '+':
          return a + b
      elif operation == '-':
          return a - b
      elif operation == '*':
          return a * b
      elif operation == '/':
          if b == 0:
              return None
          return a / b
      else:
          return None