Introduction to Scratch & Teaching Scratch

J. Philip East — University of Northern Iowa

Introductions

Getting Started With Scratch

A Larger Project

We are going to create a Scratch program/play in which a leprechaun roams about the stage/world picking up gold coins. What do you suppose we will need for that?

Getting Started

Be sure to save your program! The system save occasionally, but is worth doing yourself.

Coding

Now we are ready to start directing our actors, producing scripts for our sprites.

Scratch lends itself to the metaphor of putting on a play or making a movie. We will take advantage of that. What do directors say? ("Places everyone!" and "Action!")

Let's think for a minute about what we want to happen when we run the program. Probably something like ...

Questions/Comments? Let's move on.

Places everyone

The director says "places" but we don't really have a director. I have the stage play this part. So when the green flag is clicked we want the stage to say "Places everyone!" and then to say "Action!". Let's do that.

Questions/Comments? Ready to move on?

Okay, now all we need to do is tell the actors/sprites what to do in response to the director's messages.

Action

We want the leprechaun to respond to the coin appearing so maybe we should start our actions with the coin sprite. What we want is for a coin to appear randomly in time and in location. It should just sit there for some amount of time and if the leprechaun has not gotten to it, it should disappear. Okay?

We could duplicate coin sprite several times and have each of them carry out the actions above. Alternatively, we could "clone" the coin sprite and have its clones do the action. That is what I chose to do.

coin's script

leprechaun's script

So ..., what should the leprechaun do when it receives the "Action!" message? Probably nothing. The coin should randomly (in time and location) appears and the leprechaun should move around as the user directs him. We'll rely on key presses to control the movement.

Discussion

Teaching Scratch Considerations (Try to reserve 30 minutes for this)

This is about as far as we got to in the session. The finished example that mostly follows the directions above has been shared on the Scratch web site. Its URL is https://scratch.mit.edu/projects/108195410/ An earlier version of this this same program but with some differences is also available (via http://www.cs.uni.edu/~east/presentations/2016/getTheGold.sb2. Some additional information, discussion, links to programs and resources are included below.

Another Program

Now let's do something different—drawing your initials. (We did not get this far in the session, but ...)

Drawing Initials

There are various approaches to this task. After an introduction to Scratch it is not unreasonable to turn students loose with only the directions, "Have a sprite draw your initials." Alternatively, you could make one or more of the following suggestions.

Additional Scratch Stuff

Teaching Scratch

A variety of resources for teaching Scratch are available. Some that I am aware of are linked to below. Several that I used to link to are no longere available. Search engines may provide a good way to find specific or other resources.

Scratch Courses

I am willing to recommend two on-line courses for doing/learning Scratch.

Other Programming possibilities

If you have questions or comments/suggestions or would just like to "talk" about any of this, please feel free to e-mail me (east@cs.uni.edu)