Skip to content

Commit e4122d9

Browse files
authored
Fibonacci Series
1 parent aec9199 commit e4122d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Q21.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# fibonacci series
2+
num1 = eval(input(' Enter number of terms '))
3+
FN = 0 ; SN = 1
4+
print(FN)
5+
print(SN)
6+
for i in range(2, num1):
7+
TN = FN + SN
8+
print(TN)
9+
FN = SN
10+
SN = TN
11+
i += 1
12+

0 commit comments

Comments
 (0)