# Teaching Scratch: If statements & broadcasts

I don’t know how to program well. If you asked me to build a computer program, I’d probably fail. But I do understand how to write Scratch scripts so that the little figure of the cat, called a “sprite”, moves things around on the screen. And I understand how some of the operators work, and some of the variables. It doesn’t take a huge amount of time to learn the basics of Scratch: a few afternoons at most, for a competent adult going about it in a systematic way. You can learn what most of the components do in a few hours, enough to learn how to do 80% of the programming tasks,

Maybe there’s an easier way to teach kids how they all work than the method I hit upon, but I gave my class two tasks on Friday:

1. build two radically different actions
• e.g., play a song
• do a little dance
• tell a story
• move around
• draw a picture
2. create a command so that one command causes one action to be performed, and a different command causes the second action to be performed.

It was a hard task, but an interesting one. One kid taught the computer to play notes so that the Sprite played “Twinkle Twinkle” and “three blind mice”. Another made a little dolphin swim around, releasing bubbles as it went. A third designed a little “connect the dots” drawing game. A fourth created a little animation that shows a poor woman getting hit by a bus (I asked him to modify his program for next week). Another has built a little program where you tell it your favorite NFL player, and it insults or praises you for picking the wrong or right one.

The thing that amazes me is how many ways they found for doing these various tasks. Some used if-then statements, some used if-else, some used if-forever statements. Some used mouse clicks, some used keyboard letters…. Each kid is gradually building up a sense of how different code functions work, and learning their way around Scratch.

What’s not happening is that they’re not learning this in a systematic way. Kid Y is not learning the same snippet of code that Kid Z is learning, and they’re not learning variables or lists yet. Nor have they learned to build equations into their little programs yet, although they’re starting to get an idea of how that works.

What should next week’s challenge be?

This site uses Akismet to reduce spam. Learn how your comment data is processed.