Living Museum of Learning

Where real moments become exhibits
← Prev Next →
The First Decision

The First Decision

A computer only becomes interesting when it has to choose.

Cloud's 13th lesson introduced four new ideas together:

input()
if / else
the remainder operator %
checking whether an integer is even or odd

The most difficult concept was not if, but remainder itself. It took several minutes before the idea of "what is left after division" became intuitive, and even longer before % became a useful thinking tool instead of another mysterious symbol.

Cloud's first attempt looked perfectly reasonable to him:

if a == 0:
...
if a == 1:
...

Nothing happened.

Instead of asking for the answer, he began hunting.

One bug became another.

A missing operator.

A wrong comparison.

An indentation mistake.

A misplaced variable.

One by one, he discovered and repaired them himself.

More than ten different mistakes disappeared before the program finally spoke.

Cool!

That single word marked something much larger than a working program.

It was the moment he realized that debugging is not punishment—it is discovery.

Near the end of class, Cloud wanted to play.

Using only random distances and random turns, he created this tiny program:

from turtle import *
import random

speed(0)

for i in range(100000):
r = random.randint(1, 12)
p = random.randint(1, 360)
bk(r)
rt(p)
fd(r)
rt(p)

exitonclick()

The screen gradually filled with an unexpected image.

To me, it looked like abstract art.

Cloud smiled.

"Something under the microscope."

The computer generated randomness.

Cloud generated meaning.

Programming is often described as learning syntax.

Today showed something different.

Cloud learned that:

mathematics can make decisions;
% answers questions rather than performs arithmetic;
every bug contains information;
persistence can be stronger than explanation;
a random algorithm can produce something worth interpreting.

A few simple programming ideas—input, if, else, and %—allow a computer to begin making decisions instead of merely following instructions.

Confidence grows by fixing one mistake after another, not by avoiding mistakes.

When students discover answers themselves, they stop borrowing confidence from the teacher and begin building their own.