Here are some suggested improvements from the introduction lesson, based on me working through it (May 2, 2019)
Need to emphasize that when slicing a list, the first element is included, but the last is not. ie energy_kcal[0:2] accesses element 0 up to (but not including) 2.
Emphasize immutability when demonstrating that you can multiply particular elements of a list (conversion to kJ from kcal example)
Include exercise on grabbing a particular element of a list.
Emphasize importance of colon in for loop. Perhaps add exercise where colon is not included with error message to get students to figure out what is wrong.
"If you are comparing strings, not numbers, you use different logic operators like is, in, or is not. We will see these types of logic operators used in our next lesson."
^This isn't quite correct. We still use == with strings. In Python, is is used to check if things are the same object, while == is used to check if objects have the same value.
The exercise at the end of the lesson then uses is to check data types. We need to think about this with the explanation of is, etc
Here are some suggested improvements from the introduction lesson, based on me working through it (May 2, 2019)
Need to emphasize that when slicing a list, the first element is included, but the last is not. ie
energy_kcal[0:2]
accesses element0
up to (but not including)2
.Emphasize immutability when demonstrating that you can multiply particular elements of a list (conversion to kJ from kcal example)
Include exercise on grabbing a particular element of a list.
Emphasize importance of colon in
for
loop. Perhaps add exercise where colon is not included with error message to get students to figure out what is wrong."If you are comparing strings, not numbers, you use different logic operators like is, in, or is not. We will see these types of logic operators used in our next lesson." ^This isn't quite correct. We still use
==
with strings. In Python,is
is used to check if things are the same object, while==
is used to check if objects have the same value.The exercise at the end of the lesson then uses
is
to check data types. We need to think about this with the explanation ofis
, etc