Code written correctly but it is showing error while I am going to submit

https://cloudxlab.com/assessment/displayslide/895/print-even-numbers-up-to-n?course_id=72&playlist_id=429

Print Even Numbers up to n

def print_even(n):
for i in range(0,n):
if i%2==0:
print(i)

Program is correct but after clicking on submit it shows " You have not defined function" Why? Please explain and suggest me if there is any error.

1 Like

Did you run it using SHIFT+ENTER?

I have tried everything but it still showing error, while the code is correct!