Skip to content

Commit af08e9b

Browse files
committed
Documentation of Fibonacci
1 parent 3143501 commit af08e9b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Series/Fibonacci.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@
1919
"""
2020

2121
def Fibonacci(Num,Num1 = 0,Num2 = 1):
22+
23+
# Series store the final series to be printed
2224
Series = []
2325
Num3 = 0
26+
27+
# If Num2 is less than Num2 then swap them
2428
if Num2 < Num1:
2529
Num1,Num2 = Num2,Num1
30+
31+
# Appending the series
2632
if Num >= 1:
2733
Series.append(Num1)
2834
if Num >= 2:
@@ -34,6 +40,7 @@ def Fibonacci(Num,Num1 = 0,Num2 = 1):
3440
Num2 = Num3
3541
Series.append(Num3)
3642
Counter+=1
43+
3744
return Series
3845

3946
if __name__ == '__main__':

0 commit comments

Comments
 (0)