input: Write a function to calculate the sum of all even numbers less than or equal to a given number n. If the given number is less than 2 then return 0.
  def sum_of_even_numbers(n):
   result = 0
   if n < 2:
    return result
   for i in range(2, n+1, 2):
    result += i
   return result
  
  assert sum_of_even_numbers(10)==30
  assert sum_of_even_numbers(1)==0
  assert sum_of_even_numbers(15)==56
  assert sum_of_even_numbers(0)==0
  assert sum_of_even_numbers(2)==2
output: def sum_of_even_numbers(n):
   result = 0
   if n < 2:
    return result
   for i in range(2, n+1, 2):
    result += i
   return result