Moving Sprites in Scratch Exploring Computer Science Lesson 4-4.

10
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4

description

What do you think… Download the file moving.sb from the Hancock Web Site. Download the file moving.sb from the Hancock Web Site. Open moving.sb in scratch. Open moving.sb in scratch. Click on the “Click here for the Homework” link on the web site. Click on the “Click here for the Homework” link on the web site. Complete the homework. A word version of the questions is also on the website. You might want to have that open. Complete the homework. A word version of the questions is also on the website. You might want to have that open. Make sure you submit when done! Make sure you submit when done!

Transcript of Moving Sprites in Scratch Exploring Computer Science Lesson 4-4.

Page 1: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Moving Sprites in ScratchExploring Computer Science – Lesson 4-4

Page 2: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Journal Entry

Briefly describe how you graph something in your Algebra class.

Draw me an example graph with 5 points.

Tell me the points that you graphed

Page 3: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

What do you think…

Download the file moving.sb from the Hancock Web Site.

Open moving.sb in scratch.Click on the “Click here for the Homework”

link on the web site.Complete the homework. A word version of

the questions is also on the website. You might want to have that open.

Make sure you submit when done!

Page 4: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

The StageThe “stage” in Scratch is simply a Cartesian

coordinate system with point (0,0) in the middle:

Page 5: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Moving Blocks

The “move” block moves the sprite forward that many units.

The direction depends on which way the sprite is facing.

Page 6: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Moving Blocks

The “go to” block instantly moves the sprite to that coordinate on the stage.

The direction the sprite is facing will not change

Page 7: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Moving Blocks

The “glide” block moves the sprite to that coordinate on the stage but unlike the “go to” block the sprite will move across the screen to that location.

The direction the sprite is facing will not change.

Page 8: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Repeat Blocks

The “repeat block” will do a section of code a set number of times.

This is called iteration or looping Iteration is a programming concept common

to all programming languages.

Page 9: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Start Blocks

The code in a “when green flag clicked” block is executed when the user clicks on the green flag to run the program. Use this to move sprites to their original

position.

Page 10: Moving Sprites in Scratch Exploring Computer Science  Lesson 4-4.

Rest of Today and Friday

Download baseball.sb from the Hancock website.Use what you’ve learned about moving to get the

cat to run the bases (as realistically as possible – bases are run counter clockwise) in baseball.sb. The cat should face the right way as it runs (i.e. not run backwards)

Make sure that when you click the green flag, the cat starts at home plate again.

Extra Credit: Make the cat change costumes so that it looks like it is running as it circles the bases.