students should review the concepts they learned on … · as you can see from the pen drop-down...

13

Upload: duongliem

Post on 07-Sep-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Students should review the concepts they learned on Days 1 & 2 to make sure that they retained the information and to go over what they might have learned throughout the week when they played on their own.

They should become engaged in the material that they are to learn in this lesson.

Students should be able to use:◦ Pen Functions

◦ Operators

It may be difficult to accommodate completely new students on the third day, because it would be hard to cram three lesson's worth of information in just one

lesson. If you have new students, partnering them with those who have been attending may slow down the pace

of others, so it is recommended that they be taught separately.

If the kids have computer time on their own, ask those who attended the last lesson if they've played around

with Scratch. Ask them what new things they have learned, and perhaps share it with the class. Then, we strongly recommend to devote at least 10 minutes in reviewing the material that was covered last lesson.

Finally, show them creations that they will be able to do by the end of the lecture to engage them before beginning the lesson. Some can be found in the

additional resources section of the ScratchThat! website.

As you can see from the Pen drop-down

menu, there are many different ways to

manipulate Pen. We will now go over

them.

Pen down You must put “pen down” in a

script for pen to appear as the sprite

moves. Here is a simple script that

enables you to see this.

Pen up You must put “pen up” in a script to

stop the pen from being drawn as a sprite

moves. The script the right shows what this

block can do.

Clearing pen It is important to know how to

clear the pen off of the stage, too; it does not

go away when you stop the script. In order to

completely take away all of the pen that has

been put on the stage, there is a handy “clear”

command, available in the “Pen” blocks.

Let the kids play with the “pen

down”, “pen up”, and “clear”

commands.

Pen color You can change the pen color in multiple ways with

pen. There is a group of three blocks in the Pen menu that

control this.

The First and Third blocks are ways that you

can set the pen to a specific color.

The Second block allows you to change the

color of the pen. It can be combined with

“forever” or “repeat” to continuously change

the color instead of “setting” it to different

colors repeatedly.

Pen shade As the name indicates, including

these blocks in a script will set/change the

shade of the pen color.

Pen size These blocks change/set the size of

the pen to your liking.

Stamp This is a Pen function in that as the

sprite moves, this block creates “stamps” of

itself along the path of the sprite.

As a basic introduction to some of the functions of Operators, you

can input scripts similar to the following. Nothing happens to the

Sprites, but Scratch does respond with something back to you.

You can also put operators into other operators and other blocks.

Here are some examples that the kids can incorporate into their

programs.

Operators cont.

Have the kids go through

some scripts that involve

operators so that they can

get a feel for what they do.

It may be a complex

concept for them to just

hear and understand; they

will probably really need to

do a few examples

themselves before they

grasp it.

Below is a good script to

show them. It involves

operators, sensing, forever,

and if/else.

Variables are essential to learning more complex programming; if the kids want to build

cool games or advanced animations, they should master them. They can be used to do things such as keep score, determine which

level a player is on, etc.

The program we are going to use to teach the kids about variables is a simple game in which the player must use a cat to collect many bowls

of cheese puffs to “win”.

The first script is for the “Cat” sprite. It

tells the sprite to rotate continuously

unless the space bar is pressed, in which

case it moves forward 10 steps in the

direction it was facing at the time.

The next task is to make the variable that

will keep score of the number of cheese

puffs the cat has collected. Go to the

“Variable” tab.

The last script is for the “Win” sprite and

hides it until it receives the “Win”

broadcast.

The second script belongs to the

“Cheese Puffs” sprite and allows it

to be randomly placed on the stage

and add to score when touching

“Cat”.

The third belongs to the stage and resets the

“Score” variable. It also checks if “Score” is equal to

a certain number and then broadcasts Win and

stops all scripts.

The “Score” variable that we created is something we haven't seen

before because it is commanded by the script of more than one

sprite and thus allows interaction between various sprites. Have

the kids create a similar program that uses variables.

A majority of the last lesson is dedicated to the kids creating a final

project using everything we have taught them about Scratch. Therefore, if you

have time after the third lesson, a good idea would be to go over project ideas

with the kids. That way, they come into the fourth day already inspired and with

a goal in mind.