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.
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.
Did you run it using SHIFT+ENTER?
I have tried everything but it still showing error, while the code is correct!