Kids Coding

Think in Steps

An algorithm is a plan. Search a list. Sort a few numbers. Count how many steps.

KidsAdvancedThink in Steps

A plan, then code

An algorithm is the steps. Code is one way to write them. Search a list: look at each item until you find the target — or you run out.

Find a name

names = ["Sam", "Riley", "Jun"]
target = "Jun"
found = False

for name in names:
    if name == target:
        found = True
        break

if found:
    print("Found", target)
else:
    print("Not here")

Write the steps in plain words first, then turn each line into Python. Solving the puzzle and writing the code are two different jobs, so do them one at a time.

Count the steps

This list is tiny, so the loop is instant. The idea still matters: each check is a step. Bigger lists take more steps.

How many looks

numbers = [4, 1, 9, 2]
steps = 0
for n in numbers:
    steps = steps + 1
    if n == 9:
        break
print("Found after", steps, "looks")

Real life

Finding a book on a messy shelf, left to right.

You look at each spine until you find it — or the shelf ends. That loop is a search.

Find the book

shelf = ["Maths", "Foxes", "Maps"]
want = "Foxes"
for book in shelf:
    print("Looking at", book)
    if book == want:
        print("Got it")
        break

Change one word. Run it. That is how this idea shows up outside the lesson.

Try it

Exercise 1: Loop [3, 8, 1] and print yes if you see 8.

Show solution
for n in [3, 8, 1]:
    if n == 8:
        print("yes")

FAQ: Think in Steps

Common questions about this page.

What is StudyGrid Kids?

StudyGrid Kids is a free coding path for children: Basic, Intermediate, and Advanced. Lessons use Python in the browser. No account and no install.

Should I run think in steps examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn think in steps in this Kids Coding Python lesson (Think in Steps).

Which kids level should we start with?

Start at Basic if the child has never written code. Choose Intermediate if they can print, use variables, and write a simple if. Choose Advanced if they already use loops and lists.

Do kids need an account or an app?

No. Kids pages are public. Code runs in the Try Python editor at /try. We do not ask children for a name or an email.

What language do kids learn?

Python, with a first HTML page in Intermediate and Advanced. After Advanced, the main Python tutorial is the next step.

Is the kids coding track free?

Yes. The Kids home, the three levels, and the Python editor on StudyGrid (studygrid.in) are free.