I am trying to run the below code , but while submitting here i am getting the the error " Incorrect results for n = 1 " , code is running on jupyter notebook and producing below output, could you please advise.
Print Even Numbers up to n
def print_even(n):
for i in range(0, n):
if (i == 0):
print(’’)
if (i % 2 == 0):
print(i)
print_even(1)
print_even(4)
print_even(5)
o/p -
0
0
2
0
2
4