Help: print even numbers to n

please help in printing in even numbers

here are my codes:

def print_even(int,start,end):
start = int(input("Enter the start of range: "))
end = int(input("Enter the end of range: "))
for num in range(start, end ):
if num % 2 == 0:
print(num, end = " ! ")

Hi Sumit,

You cannot pass a variable as a parameter and then use it to take input from the user. I would suggest you to take the inputs outside of the function. Also, is there a specific reason you are printing the “!”?

Thanks.
Raj