python-novice-gapminder
python-novice-gapminder copied to clipboard
Move up conditionals?
As mentioned in as number 7 in #432, a looping exercise requires conditionals.
In addition, the exercises in the Writing Functions episode : "Find the First" and "Encapsulate of If/Print Block" also use conditionals before the conditionals episode.
Perhaps the conditional episode needs be moved up before loops?
It might be an issue of cognitive load but perhaps since the two are often intertwined we should teach loops and conditionals in one episode?
When I taught this, I ended up moving the conditionals up into the loops section. It was maybe a little awkward because I did it somewhat on the fly but otherwise seemed to work pretty well.
I would tend to agree. The potential of for is much clearer when we have conditionals. This is also related to an existing discussion (#636) on the for loop example being not great, and to a general discussion on the order of episodes (#548).