File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ keypoints:
1414- " Use `variable = value` to assign a value to a variable in order to record it in memory."
1515- " Variables are created on demand whenever a value is assigned to them."
1616- " Use `print(something)` to display the value of `something`."
17+ - " Use `# some kind of explanation` to add comments to programs."
1718- " Built-in functions are always available to use."
19+
1820---
1921
2022## Variables
@@ -209,8 +211,12 @@ weight in kilograms is now: 65.0
209211> ~~~
210212> {: .output}
211213>
212- > 
214+ > Everything in a line of code following the '#' symbol is a
215+ > [comment]({{ page.root }}/reference/#comment) that is ignored by Python.
216+ > Comments allow programmers to leave explanatory notes for other
217+ > programmers or their future selves.
218+ >
219+ > 
214220>
215221> Similar to above, the expression `2.2 * weight_kg` is evaluated to `143.0`,
216222> and then this value is assigned to the variable `weight_lb` (i.e. the sticky
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---
@@ -410,11 +409,6 @@ maximum inflammation for patient 0: 18.0
410409~~~
411410{: .output}
412411
413- Everything in a line of code following the '#' symbol is a
414- [comment]({{ page.root }}/reference.html#comment) that is ignored by Python.
415- Comments allow programmers to leave explanatory notes for other
416- programmers or their future selves.
417-
418412We don't actually need to store the row in a variable of its own.
419413Instead, we can combine the selection and the function call:
420414
You can’t perform that action at this time.
0 commit comments