Ticker

6/recent/ticker-posts

Print Fibonacci Series In Python

term=int(input('How many terns you want in your series?'))
n0=0
n1=1
if term>0:
print("Fibonacci Series")
if term==1:
print("%s"%(n0))
else:
i=0
while i<term :
print(n0)
n2=n1+n0
n0=n1
n1=n2
term=term-1
else:
print("Enter Positive number")
view raw python_1C.py hosted with ❤ by GitHub

 

Post a Comment

0 Comments

Ad Code

Join our New Telegram Channel