cconnected.
Understand the pattern. Find your own way.Find your starting point
Your learning feed/Idea 2 of 218
Ideas this builds on
Start small02 / 218

Do one small thing again

Picture

You have three stops. Visit one, then the next, then the next. A loop is a way to repeat a small instruction.

Predict

If you visit each of three stops once, how many visits do you make?

Let's look

Three visits. One for each stop.

A little Python, if you want it
visited = []
for stop in ["home", "park", "cafe"]:
    visited.append(stop)
assert visited == ["home", "park", "cafe"]

Each turn gives stop the next value. The indented line is what repeats. If the work per stop stays the same, twice as many stops means about twice as much work.

Change one rule

Now visit each stop twice. How many visits do you make?

Let's try it

Six. Three stops, with two visits each.

Connect

Next, choose which path to take. Counting repeated work will later help with running time.