1 of 1 ·What is a condition?

Lesson 1 · Creative Coding
A question the computer can answer yes or no.
Conditions
An if/else chooses between two actions. If the character touches the goal, show You win; otherwise keep playing. Point to the question and each action in a supplied example.
Click to zoomA condition is something that is either true or false. Your program checks the condition and then decides what to do. Think of it like a question: 'Is the player touching the wall?' The answer is always yes or no.
Click to zoomIF it is raining THEN take an umbrella. IF the light is red THEN stop. The part after IF is the condition; the part after THEN is the action.
3 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.