Skip to content

Commit db90727

Browse files
committed
moved comment description to first lesson
1 parent 5f2f5fa commit db90727

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

_episodes/01-intro.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ keypoints:
1313
- "Use `variable = value` to assign a value to a variable in order to record it in memory."
1414
- "Variables are created on demand whenever a value is assigned to them."
1515
- "Use `print(something)` to display the value of `something`."
16+
- "Use `# some kind of explanation` to add comments to programs."
1617
---
1718

1819
## Variables
@@ -157,6 +158,11 @@ weight in kilograms is now: 65.0
157158
> ~~~
158159
> {: .output}
159160
>
161+
> Everything in a line of code following the '#' symbol is a
162+
> [comment]({{ page.root }}/reference/#comment) that is ignored by Python.
163+
> Comments allow programmers to leave explanatory notes for other
164+
> programmers or their future selves.
165+
>
160166
> ![Value of 65.0 with weight_kg label stuck on it, and value of 143.0 with weight_lb label stuck on it](../fig/python-sticky-note-variables-02.svg)
161167
>
162168
> Let's now change `weight_kg`:

_episodes/02-numpy.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ keypoints:
1717
- "Use `array[x, y]` to select a single element from a 2D array."
1818
- "Array indices start at 0, not 1."
1919
- "Use `low:high` to specify a `slice` that includes the indices from `low` to `high-1`."
20-
- "Use `# some kind of explanation` to add comments to programs."
2120
- "Use `numpy.mean(array)`, `numpy.max(array)`, and `numpy.min(array)` to calculate simple statistics."
2221
- "Use `numpy.mean(array, axis=0)` or `numpy.mean(array, axis=1)` to calculate statistics across the specified axis."
2322
---
@@ -414,10 +413,6 @@ maximum inflammation for patient 0: 18.0
414413
~~~
415414
{: .output}
416415
417-
Everything in a line of code following the '#' symbol is a
418-
[comment]({{ page.root }}/reference/#comment) that is ignored by Python.
419-
Comments allow programmers to leave explanatory notes for other
420-
programmers or their future selves.
421416
422417
We don't actually need to store the row in a variable of its own.
423418
Instead, we can combine the selection and the function call:

0 commit comments

Comments
 (0)