Scroll down to continue to work on last week's exercises in SCRATCH.
Today's Lesson - building your MISSILE LAUNCHER! -
CLICK HERE.
If you're not interested in Scratch programming, try this one:
CodeAcademy: Starter - it's fun!
LET'S LEARN ABOUT IF-THEN STATEMENTS!
If-then statements are the bread and butter of programming. IF something happens, THEN something happens.
Think about this in real life:
- IF you talk back to your parents, THEN you get a time out.
- IF you run 10 miles, THEN you will be tired.
- IF you study for your test, THEN you will be well-prepared.
In programming, especially games, the statements look more like this.
- IF you press the space bar, THEN a missile sprite will move.
- IF the missile sprite touches a target sprite, THEN the target sprite will disappear.
- IF the target sprite disappears, THEN your score goes up by 1 point.
How about in a maze-game?
- IF you press the left arrow key 5 times, THEN your character will move 5 spaces.
- IF your character sprite touches a wall sprite, THEN your movement will stop.
SPRITES are the objects you can control on the screen. The IF-THEN statements can tell the computer how the sprites interact with one another and with your COMMANDS.