Remove mention of the identity operator (is) because it's subtle in ways that aren't appropriate for beginners. This does unfortunately mean we're doing inappropriate comparisons to None but I think that's a small price to pay.
Chapter 4: Conditions
Formatting and flesh out text
Add a section asking students to find an indentation bug
Merge sections describing else and elif and flesh out the explanation with an example in English and pseudocode
Chapter 5: Lists, Tuples, and Sets
Minor text corrections and flesh out a little
Avoid mentioning "dictionary"
Summarise in intro with a table rather than text
Add a distinct section on slicing
Add a question for students about creating an empty set(). This is meant for them to discover a pitfall. The correct answer is set(), not {} which is a dict.
Add section on unpacking and the unpacking operator *
Chapter 6: Loops
Flesh out explanation of loops where students were confused in previous teaching sessions.
Explain loop iteration with loop unrolling
Emphasise reading for as for-each
Subtly introduce iterables
Emphasise enumerate() over raw indexing with a guided "example problem".
Introduce the conventional use of _
Highlight the danger of while
Add an exercise demonstrating the danger of while.
Merging all your wonderful suggestions.
I've seen a couple of typos which I'll edit in a next commit after merging. Idem dito for the section on enumerate, might do some changes there.
Chapter 1: Introduction
help()
functionsChapter 2: Variables and operators
is
) because it's subtle in ways that aren't appropriate for beginners. This does unfortunately mean we're doing inappropriate comparisons toNone
but I think that's a small price to pay.Chapter 4: Conditions
else
andelif
and flesh out the explanation with an example in English and pseudocodeChapter 5: Lists, Tuples, and Sets
set()
. This is meant for them to discover a pitfall. The correct answer isset()
, not{}
which is adict
.*
Chapter 6: Loops
for
asfor
-eachenumerate()
over raw indexing with a guided "example problem"._
while
while
.Solutions