Email: Password:       Forgot Password 
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.

Python - Print a Fibonacci Series

Viewed:  1754 
Posted On:  23/05/2015 08:00:06 
In this article I am going to explain how we can print the fibonacci series....till 50 terms in Python 


Here in this article I am going to show how we can print a Fibonacci series in Python.

Follow below Steps:

Step 1: Open IDLE(Python GUI) in your system.

Step 2 : Type the below code and save the code Eg:- I have saved with Fibonacci name.

b = 0
c = 1

print("fibonacci series for 50 terms")


for a in range(1,50):
    d = b+c
    b = c
    c = d

Step 3 : Open command prompt.

Step 4 : Go to the saved script folder.

Step 5 : Write python <Script name>.py  for execution.(Eg.- python


         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us