Skip to content

Commit bed9f09

Browse files
mmckyclaude
andcommitted
FIX: correct while-loop semantics and an its/it's typo
Two pre-existing prose defects on lines this PR already touches, both raised in Copilot's review of #604 and listed as out-of-scope candidates in the PR description. * python_by_example.md: a while loop runs *as long as* its condition holds, not "until the condition is satisfied", which said the loop starts when the condition is false and stops when it becomes true. The next sentence already described the behaviour correctly, so the two contradicted each other. * functions.md: "each successive call uses it's own frame" -> "its". Prose only; no code cells change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ab5df41 commit bed9f09

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lectures/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def x(t):
447447
return 2 * x(t-1)
448448
```
449449

450-
What happens here is that each successive call uses it's own *frame* in the *stack*
450+
What happens here is that each successive call uses its own *frame* in the *stack*
451451

452452
* a frame is where the local variables of a given function call are held
453453
* stack is memory used to process function calls

lectures/python_by_example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ plt.plot(ϵ_values)
380380
plt.show()
381381
```
382382

383-
A while loop will keep executing the code block delimited by indentation until the condition (`i < ts_length`) is satisfied.
383+
A while loop will keep executing the code block delimited by indentation as long as the condition (`i < ts_length`) is satisfied.
384384

385385
In this case, the program will keep adding values to the list `ϵ_values` until `i` equals `ts_length`:
386386

0 commit comments

Comments
 (0)