Please read the guide .
Please answer the question in detail
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)
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)
Doubtly is an online community for engineering students, offering:
Get the pro version for free by logging in!
5.7k questions
5.1k answers
108 comments
535 users