Write a python function to add all even numbers between minimum and maximum value


Topic: Write a python function to add all even numbers between minimum and maximum value

Solution

def add_even_num(min, max):
    return sum([i for i in range(min, max) if i%2==0])
add_even_num(1, 6)



List all Python Programs