input: Write a function to calculate the average of two numbers.
  assert average(10, 15) == 12.5
  assert average(20, 30) == 25.0
  assert average(7, 9) == 8.0
output: def average(num1, num2):
      return (num1 + num2) / 2