Skip to content

Commit 3d95ce9

Browse files
Merge pull request #8 from IntelligentInfoBro/patch-1
Create fibonacci_SIMPLIFIED
2 parents e057209 + 816a3a0 commit 3d95ce9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fibonacci_SIMPLIFIED

Lines changed: 10 additions & 0 deletions
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)