input: Write a python function to calculate the sum of all odd numbers up to a given number.
  assert sum_odd_numbers(10) == 25
  assert sum_odd_numbers(1) == 1
  assert sum_odd_numbers(15) == 64
output: def sum_odd_numbers(n):
      return sum(i for i in range(1, n + 1) if i % 2 != 0)