+ 2

Can anyone please explain this line of code in Python ?

user_number = int(input("enter a number: ")) def fibbonacci(num): if num == 0 or num == 1: return num else: return fibbonacci(num - 2) + fibbonacci(num - 1) # can someone explain how this line working after second iteration for num in range(user_number + 1): print(fibbonacci(num)) #Thank You so much

25th Feb 2022, 11:43 AM
Balraj Singh
1 Respuesta
+ 1
Do you know what is the fibonacci series?
25th Feb 2022, 1:13 PM
Domonkos Gyömörey
Domonkos Gyömörey - avatar