Skip to content

Commit

Permalink
Merge pull request #8 from IntelligentInfoBro/patch-1
Browse files Browse the repository at this point in the history
Create fibonacci_SIMPLIFIED
  • Loading branch information
NitkarshChourasia authored Dec 30, 2023
2 parents e057209 + 816a3a0 commit 3d95ce9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fibonacci_SIMPLIFIED
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#printing fibonnaci series till nth element - simplified version for begginers
def print_fibonacci(n):
current_no = 1
prev_no = 0
for i in range(n):
print(current_no, end = " ")
prev_no,current_no = current_no, current_no + prev_no

print_fibonacci(10)

0 comments on commit 3d95ce9

Please sign in to comment.