Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code prompt in Fibonacci example #2665

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading