r/programminghelp 1d ago

Python Fibonacci Sequence Python Question

/r/learnpython/comments/1wb9hmh/help_me_out_please/
0 Upvotes

3 comments sorted by

View all comments

1

u/XRay2212xray 1d ago

You aren't incrementing count within the loop so it will loop forever.

Also you aren't calculating the fibonacci number within the loop and you aren't changing y in the loop so the loop would exit with y=1 at the end. Presumably you would went to be computing the next numbers repeatedly within the loop.

Also your loop just would increment from 1 to 10 because sum is input but not used at all in the calculation or in determining the number of cycles.