Fibonacci series . I got 75 out of 100 marks. Could not pass few test cases. Please help

N = int(input())
a,b= 0,1
for i in range(N):
if i <= 1:
print(i)
else:
c = a+b
a = b
b = c
if c <= N:
print©

why are u checking c<=N ; can u explain logic behind it
->try running ur code for 10 as input and count ur outputs
i think u will figure out the problem in ur code. if not plz tell me