python program for printing fibonacci numbers

Solutions on MaxInterview for python program for printing fibonacci numbers by the best coders in the world

showing results for - "python program for printing fibonacci numbers"
Paddy
26 Mar 2016
1#Python program to generate Fibonacci series Program using Recursion
2def Fibonacci_series(Number):if(Number == 0):
3    return 0elif(Number == 1):
4    return 1else:
5    return (Fibonacci_series(Number - 2) + Fibonacci_series(Number - 1))
6
7n = int(input("Enter the value of 'n': "))
8print("Fibonacci Series:", end = ' ')
9for n in range(0, n):
10  print(Fibonacci_series(n), end = ' ')
11