File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff 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> 
161167>
162168> Let's now change `weight_kg`:
Original file line number Diff line number Diff 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
422417We don't actually need to store the row in a variable of its own.
423418Instead, we can combine the selection and the function call:
You can’t perform that action at this time.
0 commit comments