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