## Summary:

Students create and illustrate a Scratch activity that explains their thinking when solving a problem such as Avery’s Cookies: I have 6 cookies. Mary has 2.5 times as many cookies as I have. How many cookies does Mary have? They create a block and use input to generalize the problem so the activity will find the answer no matter how many of cookies there were at the start of the problem.

## Materials:

- Avery’s Cookies Scratch activity
- Balloons Scratch activity
- Screencast Tutorials
- If needed, Avery’s Cookies Scratch activity (student version)
- Copies of the Balloon Planning Page
- Copies of Generalize the Problem Worksheet
- If needed, copies of The Script Worksheet
- Classroom computer and students computers

## Programing Skills with Scratch:

- Make a Block from the More Blocks category
- Generalize a script to answer any similar problem
- Input a value or parameter into a block
- Join and nest addition, multiplication, join, say blocks
- Broadcast and receive a message
- Scratch blocks used: (Make and define a block, say, change color effect, join, addition, multiplication, repeat, wait, forever, broadcast, receive a message, turn, move, point in direction)

## Lesson:

- Open and discuss the Balloons Scratch activity.
- Press the stop sign by the green flag after the problem has been stated on the second backdrop and allow time for students to answer the problem before continuing on to see how the script solves the problem.

- Ask how many backdrops are used in this activity? (There are 3 backdrops. To see them click the Stage 3 backdrops shown below the stage. Then click the Backdrops tab. Notice two of the backdrops are used to state the problem.)
- Which sprite controls when the backdrops change? (Avery)
- Pass out copies of the Balloon Planning Page. Allow students to complete this page with a partner or individually. Collect, approve, and save these for students to use later.
- Open and discuss the Avery’s Cookies Scratch activity.
- Run the activity several times.
- Change the input number from 6 to 10 in the Avery’s cookies block. Run the program again. Notice what happens.
- Change the input number and run the program several times. What is the advantage of having an Avery’s cookies block?

Teacher Information:

A key concept in computer science is generalization. When you use generalization you find one way to solve different versions of the same problem. If you generalize the problem, you only need to write one script to solve similar problems.

- Be sure students know how to create and define the new block Avery’s cookies to generalize the problem. (Watch the 1st screencast tutorial.)
- Click the More Blocks category.
- Click Make a Block.
- Type a name for this new block in the space by the blinking cursor. (Always give it a name that makes it clear what the block will represent or do.)
- Click Options, then click the oval after Add number input.
- Click inside the white oval to name the parameter. (Parameters are like variables except they belong to a particular script. Always give them a name that makes it clear what the block will represent or do.)
- Attach script to the new block to define it.

- Be sure students know how to use join blocks to join words with variables. (Watch the 2nd tutorial.)
- Be sure students know how to use join blocks with addition and multiplication blocks. (Watch the 3rd tutorial.)
- Be sure students know how to use the green flag to start a script. (Watch the 4th tutorial.)
- Pass out copies of the Generalize the Problem Worksheet. Allow time for students to work with a partner or individually to complete this worksheet. As they finish allow them to use the Scratch activity Avery’s Cookies to check their answers.

- Tell student they are going to create their own activity that will create a generalized solution for the problem they created on their Balloon Planning Page they finished in #5 above.
- Decide if you want students to work alone or with a partner.
- Allow time for students to create and illustrate their problem with Scratch.

## Extensions:

- Ask students to create a generalized script that will answer a problem such as this:
I have 20 dollars.

Matthew has 3 and 3/4 times as much money as I have.

How much money does Matthew have?

## Accommodations:

- Is some student need additional assistance, allow students to use The Script Worksheet.
- If students need additional help, allow them to open the Avery’s Cookies Scratch activity (student version)

Ask them to add movement, color changes, sound or any other effect to make the script their own.

## Common Core:

5.NF.4, 5.NF.4a, 5.NF.6

## CT/CS Standards:

CT-Solve problems by decomposing them into smaller parts, Write programs that accomplish specific goals, Work with various form of input/output, functions

CS– Abstractions, Generalization, Algorithmic Design

Lessons prepared as web documents in Summer 2017. Contact us for updated lesson plan materials.