Skip to content

Commit

Permalink
Fix code prompt in Fibonacci example (#2665)
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo authored Dec 2, 2024
1 parent 1da2a8a commit 4efdd87
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions codesamples/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ def initial_data():
<code>
<span class=\"comment\"># Write Fibonacci series up to n</span>
>>> def fib(n):
>>> a, b = 0, 1
>>> while a &lt; n:
>>> print(a, end=' ')
>>> a, b = b, a+b
>>> print()
... a, b = 0, 1
... while a &lt; n:
... print(a, end=' ')
... a, b = b, a+b
... print()
...
>>> fib(1000)
<span class=\"output\">0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610</span>
</code>
Expand Down

0 comments on commit 4efdd87

Please sign in to comment.