Use Python’s map function to introduce students to loops early on, because the map function is an provides an easy transition to loops.

  • Introducing students to loops early is a good way to keep programs they create interesting.
  • Loops help create an interesting and complicated problems.
    • For example, tell the story of when Carl Friedrich Gauss was in first grade, he and his classmates were told (as a form of punishment) to add up the numbers from 1 to 100. What is that sum? We can write a simple function using map to compute it.

More about this tip

External Source
Ran Libeskind-Hadas at the CSNYC Tip-A-Thon.