The Dancing Cat

Now, we will start creating our Dancing Cat Scratch program.

During this activity we will focus on how blocks in Scratch are run in sequence.

Create a new Scratch program and name it "Dancing Cat".

In the Scripts Area, add the following blocks:


Click the stack of blocks and see what happens.

The Cat should move to the right in one movement. This is often unexpected - people usually expect the Cat to move in separate steps or to do 2 movements across the screen.

The move blocks above do not mean that the Cat will take 40 separate steps but that the Cat will move 80 pixels to the right in one movement.

Also, while we have two separate move blocks in the code above, the Cat does not wait between these blocks. So the Cat moves 80 steps in total, without pausing.

Remember that when Coding, the instructions we give to a computer must be precise and direct. To get the Cat to pause before the second move block, we must add a wait block.

Change the code in your program so that it looks like the stack below, by adding a wait block.


Click the block and see what happens.

Now the Cat will move 40 steps to the right, pause for half a second and move another 40 steps to the right.

We want to make the Cat dance, rather than just move to the right. To do this, change your stack of blocks to this instead:


Click the blocks. Now the Cat will move to the right and then move back to its original position.


Views
1 Total Views
1 Members Views
0 Public Views
Share on Social Networks
Share Link
Share by mail

Please login to share this webpage by email.