Computer Science, asked by raveena81, 5 months ago

Write a program to display Fibonacci series 0 1 1 2 3 4 5…… (upto n terms)​

Answers

Answered by AnubhavPHP
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 arunagirivp1967
3

Answer:

sis u tamil or malayalam..

Similar questions