¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Fibonacci series
Could you please let me know why this python code to print Fibonacci series up to 100 prints even 144 https://code.sololearn.com/c5B505VWVKNl/#py
2 Respuestas
+ 3
you check if a<n before you add to it,
so 89<100 = true
89+55 = 144
print(144)
144<100 = false so loop terminates here after already printing 144
0
Thanks JME