Generate a python program that prints out all the even numbers between a given range of integers
1 to 50
def print_even_numbers(start, end):
    for num in range(start, end+1):
        if num % 2 == 0:
            print(num)

# main
start = 1
end = 50
print_even_numbers(start, end)