Lesson 1 · Computational Thinking
Yes/no decisions in daily life.
You made hundreds of decisions today and every one had the same shape:
IF something is true THEN do this.
IF it's raining THEN carry an umbrella. IF the bus is full THEN wait for the next one. IF homework is done THEN you can play.
The part after IF is the condition — a question with only two possible answers, yes or no. The part after THEN is the action.
This is the rule that makes if/then work: a condition has to be answerable with yes or no. Nothing in between.
"Is the score above 50?" — yes or no. ✅ "Is it raining?" — yes or no. ✅ "How is the weather?" — that's not a condition. It has a hundred answers. ❌
If your condition can be answered "sort of" or "it depends", rewrite it until it can't. Computers have no way to act on "sort of".
5 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.