Fibonacci Series – Python

# -*- coding: utf-8 -*-
Created on Thu Sep 15 23:54:44 2016

@author: Shruti

#This program will generate fibonacci series upto n numbers
#fibonacci series is 1,1,2,3,5,8,13,...

def fibonacci(n):
 return 0
 return 1
 return fibonacci(n-1) + fibonacci(n-2)

print (fibonacci(3))

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: