RunestoneInteractive / fopp

Foundations of Python Programming
https://runestone.academy/runestone/static/fopp/index.html
38 stars 120 forks source link

enumerate and tuples used without introduction #242

Closed presnick closed 5 years ago

presnick commented 5 years ago

_sources/Iteration/TraversalandtheforLoopByIndex.rst makes use of enumerate and iterating with tuple unpacking.

I think this sub_chapter should be rewritten to not use those.

bnmnetp commented 5 years ago

I do not think students need to understand the concept of tuple unpacking to make use of enumerate. This is no less foreign to them than for i in range(5): and in fact for some comes easier because they see the parallel-ness of the item and the index.

presnick commented 5 years ago

The difference is that they have all the tools to reason through what for i in range(5) does, but they do not. They may be able to skim over enumerate with tuple unpacking and get the right intuition, but you would have to teach it as magic at this point in the course. I prefer to minimize magic.

bnmnetp commented 5 years ago

fixed