why??? I don't understand this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

why??? I don't understand this code

def fibo(n): if (n==0): return 0 elif (n==1): return 1 else: return (fibo(n-2) + (fibo(n-1))) n = int(input("Number: ")) for n in range(0,n): print(fibo(n)

25th Feb 2022, 5:09 PM
Muhammad Ali Bovaqulov
Muhammad Ali Bovaqulov - avatar
4 Answers
+ 4
Why what? Please ask a complete question Un case you mean the error: The closing ) of the print function is missing.
25th Feb 2022, 5:16 PM
Lisa
Lisa - avatar
+ 3
It is called recursion and will be explained in lesson 68 of the Python Core course.
25th Feb 2022, 5:45 PM
Lisa
Lisa - avatar
+ 1
i don't understand this code
25th Feb 2022, 5:24 PM
Muhammad Ali Bovaqulov
Muhammad Ali Bovaqulov - avatar
0
thank you Lisa i understand this is factorial
25th Feb 2022, 5:57 PM
Muhammad Ali Bovaqulov
Muhammad Ali Bovaqulov - avatar