Let's look again at the importance of inside vs. outside of loops.
Loop - power technique to do something a zillion times
For a line of code ...
-inside vs. outside the loop is a huge difference.
Experiment:
Facts: 2000 names (rows) total, 12 names end with "x"
Move this line to various spots: print("nom");
How many "nom" for each "Location N" below.
Enter your guess numbers below
Then we'll try running it
tablea5-1
Experiment solutions:
Location 1: 1 (outside the loop, before it)
Location 2: 2000 (in the loop, not in the if-body)
Location 3: 12 (in the if-body)
Location 4: 1 (outside the loop, after it)