Assemble working scripts from shuffled lines — functions, choices, loops, and events — without typing a thing.
Reading code and writing code are different skills — and this lesson drills the one in between: ordering. Each activity shows the lines of a working shuffled up, with a few imposters mixed in. Tap the right lines in the right order, leave the fakes out, and you've built the . No typing, just judgment.
Code runs top to bottom. So ask yourself at every line: does this need something that only comes later? A must be declared before it's used. A must be defined before it's called. An end must close what a function or if opened.
Let's warm up with a :
A conditional checks top to bottom. Decide the order so the right branch wins for a score of 75.
A knows exactly how many laps it runs. Arrange it.
don't run now — they register for later. Order the connect correctly, passing the itself, not a call to it.
You just arranged four — a , a choice, a , and an . Notice the skill you used: you read a as a sequence, in your head, and checked every line against the ones around it. That's exactly how you'll read real code when something breaks.
You're arranging lines and one uses coins before declaring it. Where should the declaration go?