0
Fibonacci a infinite loop?
This fibonacci serie code use decomposition and recursion to generate the serie, but it look like if it doesn't converge and the program never finish, it should work at least for 996 numbers. Someone can help me to understand or find the bug? Try with an input of 2 https://code.sololearn.com/c9c6jJ13gGiF/?ref=app
2 Antworten
+ 5
You use bitwise or operator (|) in line #7
Replace it with conditional or:
if n == 0 or n == 1:
+ 1
andriy kan Thanks a lot!!, What a bug jjeej