Skip to content

Commit

Permalink
Create Fibonacci.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kriti1976 authored Oct 20, 2020
1 parent 354e735 commit b9115a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Python/Fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def Fibonacci(n):
if n<0:
print("Incorrect input")

elif n==1:
return 0

elif n==2:
return 1
else:
return Fibonacci(n-1)+Fibonacci(n-2)

0 comments on commit b9115a4

Please sign in to comment.