Skip to content

Commit ebeb6e4

Browse files
Merge pull request #2078 from NitkarshChourasia/main
add: fibonnaci_simplified version.
2 parents 6a094e6 + 3d95ce9 commit ebeb6e4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fibonacci_SIMPLIFIED

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
#printing fibonnaci series till nth element - simplified version for begginers
3+
def print_fibonacci(n):
4+
current_no = 1
5+
prev_no = 0
6+
for i in range(n):
7+
print(current_no, end = " ")
8+
prev_no,current_no = current_no, current_no + prev_no
9+
10+
print_fibonacci(10)

0 commit comments

Comments
 (0)