lc-python-intro icon indicating copy to clipboard operation
lc-python-intro copied to clipboard

Checkout Suggestion on Python Intro for Libraries Lesson: For Loops page

Open geospatial-gill opened this issue 4 years ago • 1 comments

In the Python Intro for Libraries Lesson: For Loops episode, it might be clearer to new learners if the first 2 blocks of code were reordered. When I've taught this lesson as a demo, I've done it this way and it seems to go very well. After the introduction on what a For loop does, show the steps the "long way" first, then demo the more elegant way of using a loop to accomplish the same task:

  1. print(2) print(3) print(5)
  2. This series of print statements is equivalent to a for loop: for number in [2, 3, 5]: print(number)
  3. And the output for both is the same: 2 3 5

geospatial-gill avatar Nov 10 '21 00:11 geospatial-gill

Many thanks @geospatial-gill - we will discuss this suggestion.

konrad avatar Nov 20 '21 19:11 konrad

Closing since a major update to the lesson will soon be merged, deprecating most standing issues. Thanks for your contribution!

chennesy avatar Jun 14 '24 13:06 chennesy