Write a Python program to get the Fibonacci series between 0 to 50.

Thanks for contributing an answer!

\(........\)

Avoid writing here -

a,b=0,1 while b<50: print(b) a,b= b,a+b

n=int(input("Enter the length of fibonacci series : ")) a=0 b=1 print("Series : ") for i in range(n): if n<0: print("Invalid input") elif n==0: print(0) elif n==1: print(1) else: c=a+b a=b b=c print(b)

382 questions

257 answers

105 comments

155 users