+ 1
Can anyone help me with the Fibonacci code of python core. PLEASE!!!!. I have fail to reason it out. I'm a beginner in coding
Here's my code num = int(input()) def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2) for number in range(num): print(fibonacci(number)) Hints and critics are welcomed
3 ответов
+ 3
Can you please share your try here
Just for helping us clarifying the reason of error ?
+ 1
You need to give two inputs one is the starting number and ending number. Because you didn't input a second value , the range in not completed. So, you won't get the expected output 😊 hope it helps you 😄