Write a program to display Fibonacci series 0 1 1 2 3 4 5…… (upto n terms)
Answers
Answered by
2
Answer:
def fibo(n):
if n <= 0:
print('Wrong input!')
elif n == 1:
return 0
elif n == 2:
return 1
else:
return fibo(n-1) + fibo(n-2)
def main():
n = input('Enter the number of terms: ')
for i in range(n):
fibo(i)
if __name__ == "__main__":
main()
Hope it Helps
Answered by
3
Answer:
sis u tamil or malayalam..
Similar questions
Math,
2 months ago
Math,
2 months ago
Social Sciences,
2 months ago
English,
10 months ago
Economy,
10 months ago
Social Sciences,
10 months ago