0
Why none is printed
num = int(input()) def fibonacci(n): #complete the recursive function if n<=1 : return n else : a = 0 b = 1 print(a) print(b) for i in range (2,n): c = a+b print(c) a = b b = c print (fibonacci(num)) #output for 5 as num : # 0 # 1 # 1 # 2 # 3 # none (why none is printed ?)
2 Respostas
+ 4
Ben Hamida Mohamed Amine
Or dont print function just call it
+ 3
You should return something inside else part also