Living Museum of Learning

Where real moments become exhibits
← Prev Next →
From Algorithm to Picture

From Algorithm to Picture

Seven random numbers, one maximum, and a red bar

Tianjing had only about two months of schooling in Canada at this point, even though she had landed in the country about a year earlier.

Her English was still developing. Even simple words such as “find” and “greatest” were not easy for her to spell, and she might not yet have known that English naturally says “the greatest.”

So when we started this project, I did something unusual.

I helped Tianjing write down her own algorithm in English.

Not an algorithm copied from a textbook.

Not instructions I gave her.

Her own thinking, expressed in a language she was still learning.

We have the historical screenshot.

It may look like a tiny piece of paper, but for me it records a remarkable moment: for the first time in her 13 years, Tianjing was writing down her own computational thinking in English.

The five steps were:

√ get 7 random numbers

√ find the greatest, e.g. 187

draw bars < 187

draw a red bar for 187

draw the rest bars

The first two steps were completed together in class.

The remaining three became homework.

The interesting challenge was therefore not simply programming.

Tianjing had to cross several boundaries at once:

Chinese thinking -> English expression

English expression -> algorithm

algorithm -> Python code

numbers -> visual representation

And she did it.

She generated seven random numbers, stored them in a list, found the greatest number, and then used that result to control her turtle drawing.

Her code included:

box = []

for _ in range(7):

n = random.randint(0,200)

box.append(n)

She then compared the numbers to the maximum and made the maximum visible as a red bar.

The language barrier had not disappeared.

The mathematical idea had not suddenly become sophisticated.

But she had successfully carried an idea across all these different representations.

What emerged was much bigger than a seven-number exercise.

The algorithm that first existed as a few handwritten English phrases became a working visual artifact.

The computer generated data.

Tianjing's algorithm found something important in that data.

Her turtle program then communicated the result visually.

A number such as 187 was no longer just something printed on the screen.

It became a red bar that stood above the others.

And there is something else I find especially precious.

Tianjing did not need perfect English before she could begin thinking computationally in English.

We simply built a bridge around the words she did not yet own.

The screenshot captures that bridge.

This project taught Tianjing several things simultaneously.

First, think before coding.

We wrote the algorithm before completing the program.

Second, break a problem into steps.

A complicated-looking task became five concrete actions.

Third, separate computation from visualization.

Finding the maximum and drawing the bars are different jobs, connected by the result of the algorithm.

Fourth, use one representation to help create another.

Words became an algorithm.

The algorithm became code.

The code became a picture.

And perhaps most importantly:

English does not have to be perfect before meaningful thinking can happen in English.

A 13-year-old girl who was still struggling to spell words like “find” and “greatest” was nevertheless capable of designing an algorithm and making a computer execute it.

That is why I kept the original screenshot.

Years from now, the five lines may look almost laughably simple.

But the historical moment they record is not simple at all.

A student with limited English, little new country schooling, and a small amount of programming experience can still formulate an algorithm and turn it into a working visual program.

Start with the student's own idea. Help her express it in whatever language is necessary, break it into steps, and then gradually translate those steps into code and visualization.

The goal is not perfect English, perfect syntax, or memorized programming commands.

The goal is to help a child experience the complete loop:

I have an idea -> I can express it -> I can build it -> I can see it work.