1 of 24

CREATIVE COMPUTING

​

Green Level Student Workbook

Computer Science for All

SAN FRANCISCO UNIFIED SCHOOL DISTRICT

2 of 24

Using the power of computers to solve problems and express ourselves.

THINGS COMPUTER SCIENTISTS DO:

Always log in to Scratch accounts.

Keep usernames and passwords private.

Give projects a name.

Share creations and ideas with others.

Collaborate with others.

Ask for and provide feedback.

Act safely, responsibly, and respectfully online.

Give credit for images and music used in projects that were found on the Internet.

Encourage others to join in the fun!

COMPUTER SCIENCE

3 of 24

Steps to complete a task.

Computer scientists use an algorithm to plan out the steps they want a computer to follow. Here is an algorithm for Scratch cat:

ALGORITHM

1. Move forward 10 steps

2. Wait 2 seconds

10

2

3. Change color to green

PROGRAM

A set of instructions written in a language that a computer understands.

A computer cannot understand the same languages that people speak. We must write code, a special language that a computer understands. An algorithm written in code is called a program.

​

​

Here is a program for Scratch cat’s algorithm from above.

​

Can you match each step of the algorithm with each code block?

1

4 of 24

A script is a set of Scratch blocks connected together to form a sequence.

A set of instructions that

follow one another in order.

To create an algorithm, a computer scientist must be very precise when describing the steps to complete a task. The sequence, or order, of those steps is also very important.

This script uses the same blocks. The same actions will occur, but the outcome will not be the same because the script uses a different sequence.

SEQUENCE

When you connect blocks together in Scratch to form a script, the sprite will follow them in order, one after another.

In this script, the sprite will first move 10 steps, then say “Hello!” for 2 seconds, and lastly will play the sound “pop”.

10

1.

2.

3.

1.

1.

2.

2.

3.

3.

2

POP!

1.

2.

3.

Hello!

POP!

10

Hello!

5 of 24

EXPLORING SEQUENCE

What will happen first in this script? What will happen last?

​

Describe the sequence of everything that will happen in order from first to last.

These two scripts use the same blocks. Are they the same or different? Can you explain why?

Describe the sequence of what will happen, in order, in this script.

​

Be specific and include all of the information you see on each block.

3

6 of 24

Drag another glide block to the bottom of the script.

​

Then, drag the glide block to the bottom of the script.

​

3. Move the sprite to the last place on the stage.

​

2. Move the sprite to the next place on the stage.

Then, drag the go to x: y: block to the script below the “when green flag clicked” block.

1. Move the sprite to the starting place on the stage.

​

Use the block to start the sprite at the same place every time the green flag is clicked.

​

Use the block to make the sprite move to an exact location on the stage.

​

The x and y numbers are automatically filled in for you based on the sprite’s location.

UNLOCKING THE GLIDE BLOCK

4

7 of 24

Animate your name using a sequence of blocks!

NAME POEM

START HERE

  1. Start a new project in Scratch.
  2. Pick the letter sprites from the Scratch library to spell your name on the stage.
  3. Drag the letters to their starting positions, then use these two blocks to start them in the same place each time the green flag is clicked.

​

  • Add this block to each sprite to make the letters clickable.

​

  • Use these blocks to create the sequence for each letter of your name poem. Add them below the “when this sprite clicked” block.

​

​

​

  • Click on each letter on the stage to see your name poem program run!

​

THINGS TO TRY

  • Add a backdrop.
  • Make each letter do different things!
  • Explore other blue motion and purple looks blocks!

ADD A NEW BACKDROP

  1. Click the Backdrops button
  2. Then, click on a backdrop to select it.

5

8 of 24

PEER FEEDBACK

TWO STARS AND A WISH

Share two things you like about a classmate’s project.

Share one way to improve their project.

FEEDBACK SENTENCE STARTERS:

​

My favorite part was __________________________.

I like the way you _____________________________.

I’m excited to learn how you __________________.

​

What if _______________________________________?

Next time, try _________________________________.

An idea I had is ________________________________.

6

9 of 24

An action that causes

something to happen.

These are event blocks in Scratch. They control the action in your program. A script in Scratch should always begin with an event block.

In this script, every time the sprite is clicked, it will move 10 steps, then say “Hello!” for 2 seconds.

In this script, every time the green flag is clicked, the sound “Dance Around” will play until it is done.

EVENT

10

Hello!

7

10 of 24

What will happen when the green flag is clicked?

What will happen when the sprite is clicked?

What will happen when the green flag is clicked again?

EXPLORING EVENTS

How do you make the sprite say “hello”? Move 10 steps?

Play the sound “pop”?

Describe what each event will cause the sprite to do:

8

11 of 24

Use events in Scratch to create an interactive collage about yourself!

ABOUT ME

START HERE

  • Start a new project in Scratch.
  • Pick a sprite from the Scratch library to add to your project.
  • Drag the sprite to its starting position, then use these two blocks to start it in the same place each time the green flag is clicked.

​

  • Use this event block to make your sprite interactive.

​

  • Use these blocks below the event block to personalize your project.

THINGS TO TRY

  • Add more sprites.
  • Add a backdrop.
  • Change a sprite’s costume.
  • Add background music.
  • Make your sprite speak out loud using the Text-to-Speech extension blocks!

OTHER BLOCKS TO PLAY WITH

9

12 of 24

Repeat a sequence of instructions.

This is a repeat loop block in Scratch.

​

It controls how many times something will repeat in your script.

In this script, the sound “meow” will repeat 10 times.

In this script, both actions will repeat 6 times.

​

Change the number next to the word “repeat” to control the number of times the blocks inside the loop will repeat.

In this script, the sprite will glide to a place on the stage before the sound “zip” repeats 4 times.

​

After the sound “zip” repeats 4 times, the sprite will change color.

LOOP

10

13 of 24

BREAKING LOOPS DOWN

This sprite will first change to the next costume, then wait 1 second. This sequence will repeat 2 times. If you break down the code in this loop, it would look like this:

11

In both scripts below, the sprite will first go to the middle of the stage, then play the sound “moo” 3 times. Last, the sprite will glide to a different place on the stage.

1

2

{

{

{

{

{

1

2

3

Computer scientists use loops to make it easier to read and write code that repeats.

Compare these two scripts that do the same thing.

​

Which one is easier to read? Why?

Which one would be easier to write? Why?

14 of 24

EXPLORING LOOPS

How many times will the sound “buzz” play?

Which two of these scripts will do the same thing?

Describe the sequence of what will happen, in order, in this script.

​

Be specific and include all of the information you see on each block.

How many times will the sound “hiss” play? How about the sound “pop”?

12

15 of 24

Use loops to combine music and animation to create a dance party!

DANCE PARTY

START HERE

  • Start a new project in Scratch.
  • Select 2 or more sprites from the Scratch library to add to your project.
  • Use these blocks to start each sprite in the same place every time the green flag is clicked.

​

  • Use 2 or more looks and motion blocks inside a repeat loop to make each sprite dance.

​

​

  • Use 1 or more sound blocks inside a repeat loop to play dance music.

THINGS TO TRY

  • Add a backdrop. Use a repeat loop block to make it change color!
  • Use the switch costume block to pick which costumes the sprite repeats in its dance!
  • Find and use the Music extension blocks to code your own song or beat.

OTHER BLOCKS TO PLAY WITH

13

16 of 24

Coordinating actions

between different sprites

Back-and-forth actions between two sprites can be synchronized using wait blocks to set the timing between the actions.

When you tell a joke, it is important to wait for one person to finish talking before the next person starts.

SYNCHRONIZATION

In the scripts below, Owl asks a question and Bat waits until Owl is finished to answer it.

14

17 of 24

EXPLORING SYNCHRONIZATION

Synchronize this conversation with the missing wait times in the scripts below.

Which sprite will speak first when the green flag is clicked?

There are bugs in this program. How would you fix the timing for this joke?

15

18 of 24

DO:

Be respectful.

Talk about the work.

Explain what you are doing.

Switch roles often.

Think ahead and

make suggestions.

Driver

Controls the actions of the computer.

Navigator

Helps the driver by thinking about the BIG picture and offering suggestions.

PAIR PROGRAMMING

Two programmers working collaboratively on one device.

DON’T:

Be a bossy navigator.

Grab the driver’s mouse or keyboard.

16

19 of 24

Use events, loops, and synchronization to tell a story in Scratch!

STORYTELLING

START HERE

  • Start a new project in Scratch.
  • Select 2 sprites from the Scratch library. Start each sprite’s script with the same event block so both scripts will run at the same time.

THINGS TO TRY

  • Use the “go to x: y:” block to make sure the sprites always start in the same place.
  • Switch the backdrop during the story to change scenes.
  • Use “hide” and “show” blocks to make a sprite appear and disappear during the story.

OTHER BLOCKS TO PLAY WITH

17

  1. Use “say” and “wait” blocks in sequence to create a dialogue between the sprites. Synchronize the “say” and “wait” timing so the sprites do not talk at the same time!

​

  • Use repeat loop and event blocks to add music, movement, and animation.

20 of 24

EXPLORING MAKEY MAKEY

1. Plug the Makey Makey into the computer using the red USB cable.

USB cable

red light should turn on

2. Close any pop-up windows.

3. Connect yourself to EARTH

Alligator clip into “EARTH”

Hold the metal part.

TIP: Removing the cover makes the clip easier to hold!

4. Try playing Flabby Physics!

www.flabbyphysics.com

Hold the metal part of EARTH clip

Touch metal “SPACE” area

green light means it’s working!

5. Connect everyday objects!

Connect an object to the board - try metal, food, or play-doh

Hold the metal part of EARTH clip

Touch the object to complete the circuit!

18

Your computer should think the space key was pressed. If not, try pressing more firmly with your finger.

21 of 24

MAKEY MAKEY + MUSIC

Use the Makey Makey to create bongos or a piano, and then rock out with your classmates!

makeymakey.com/bongos

You will need 3 alligator clips to create the bongos.

​

Which keys will you need to connect?

makeymakey.com/piano

You will need 6 alligator clips to create the piano.

​

Which keys will you need to connect?

19

22 of 24

SCRATCH INTERFACE

Add a new sprite by clicking on the cat button in the sprite area.

​

A sprite is an object or character you can program in Scratch.

Here’s where you can find the important things in Scratch:

Click on these buttons to add a new backdrop or sound, too.

Explore the other options on the blue menu!

20

23 of 24

COMPUTER SCIENCE VOCABULARY

algorithm: steps to complete a task

computer science: using the power of computers to solve problems and express ourselves

computational thinking: thinking like a computer scientist; involves decomposition, abstraction, pattern recognition, and algorithms

copyright: a law that protects a creator’s rights and requires other people to get permission to use, copy, and share their work

Creative Commons: a copyright license that makes it easier for people to copy, share, and build on other people’s creative work, as long as they give credit to the creator

debug: find and fix errors (bugs) in programs

decomposition: breaking down a problem into smaller pieces

digital citizen: someone who acts safely, responsibly, and respectfully online

event: an action that causes something to happen

Internet: a group of computers that are connected to each other

loop: repeat a sequence of instructions

pair programming: two programmers working collaboratively on one device

parallelism: sets of instructions that run at the same time

program: a set of instructions written in a language that a computer understands

sequence: a set of instructions that follow one another in order

synchronization: coordinating actions between different sprites

24 of 24

How to start a new Scratch project:

​

  1. Go to scratch.mit.edu
  2. Log in with your username and password
  3. Click “Create”
  4. Name your project
  5. Click “Share”
  6. Add your project to the studio
  7. Start working on your project!

​

​

DONE with your project? Check for the following:

  • I included INSTRUCTIONS for how to run my project.
  • I gave CREDIT to anyone who helped me with this project.
  • I gave CREDIT to the original creators of all images and music that I downloaded from the Internet.
  • I gave FEEDBACK (2 stars and 1 wish) to at least THREE classmates’ projects.
  • I looked at feedback I received and IMPROVED my project.

Created by the San Francisco Unified School District (SFUSD) Computer Science team: CSinSF.org.

Adapted from resources developed by the CANON Research Lab from University of Chicago STEM Education, and the

ScratchEd team at the Harvard Graduate School of Education. Shared under a Creative Commons license (CC BY-NC-SA 4.0)