2 of 1 ·If / else

Lesson 2 · Creative Coding
Do one thing when true, another when false.
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 zoomTwo pathsif/else lets your program choose between two paths. If the condition is true it runs the first path; otherwise it runs the else path.
4 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.