0

Wher i goes wrong??

num = int(input("Enter the number: ")) def f_series(n): if n == 0:return 0 elif n == 1 or n == 2: return 1 else: return f_series(n - 1) + f_series(n - 2) for value in range(num): print(f_series(value))

4th Apr 2021, 7:23 AM
Maharsh Patel
Maharsh Patel - avatar
4 Réponses
+ 3
Maharsh Patel Because you should not print anything else except output. Here Enter the number is also printing so remove this line and just write num = int(input())
4th Apr 2021, 7:29 AM
A͢J
A͢J - avatar
4th Apr 2021, 7:26 AM
A͢J
A͢J - avatar
+ 1
Thank you...
4th Apr 2021, 7:43 AM
Maharsh Patel
Maharsh Patel - avatar
0
Because solo learn compiler shows wrong output, because i have to print Fibonacci series..
4th Apr 2021, 7:27 AM
Maharsh Patel
Maharsh Patel - avatar