Students apply their skills in using the Design Recipe and writing purpose statements to a variety of word problems.

Lesson Goals

Students will be able to:

• Understand how to use the Design Recipe to break down simple word problems.

• Create a strong purpose statement that details in their own words what the function is doing.

Student-Facing Lesson Goals

• I can use the Design Recipe to break down word problem when writing a function.

• I can identify domain and range and other quantities in a word problem when writing a function.

• I can create and revise a strong purpose statement that explains what the function is doing.

Materials

Preparation

• Make sure all materials have been gathered

• Decide how students will be grouped in pairs

Key Points for the Facilitator

• The purpose statement, like the contract, is a comment - something that the computer doesn’t read. It’s important for readability of their code - there may be other people looking at their code and using their functions!

• The domain and range of a function are described as data types, such as Number, String, or Image.

• If students struggle with getting started, encourage them to start with one example and use the Mapping examples with Circles of Evaluation organizer.

• This activity can work well as a formative review.

• This activity is a good time to get students working with someone other than their usual coding partner.

Language Table

 Types Functions Values Number `+`, `-`, `*`, `/`, `num-expt`, `num-sqr`, `num-sqrt` `4`, `-1.2`, `2/3`, `pi` String `string-length`, `string-repeat`, `string-contains` `"hello"`, `"91"` Boolean `<`, `<>`, `<=`, `>=`, `<`, `>`, `==`, `<>`, `>=` `true`, `false` Image `star`, `triangle`, `circle`, `square`, `rectangle`, `rhombus`, `ellipse`, `regular-polygon`, `radial-star`, `text`, `overlay`, `above`, `beside`, `rotate`, `scale`, `flip-horizontal`, `flip-vertical` `π΅πΊπΆ`

Glossary
data types

a way of classifying values, such as: Number, String, Image, Boolean, or any user-defined data structure

debug

to find and fix errors in one’s code

design recipe

a sequence of steps that helps people document, test, and write functions

domain

the type or set of inputs that a function expects

function

a mathematical object that consumes inputs and produces an output

purpose statement

a concise, detailed description of what a function does with its inputs

range

the type or set of outputs that a function produces

## 🔗Focusing on Purpose Statements 30 minutes

### Overview

This lesson is all about practice with word problems, focusing on the specific skill of writing a good purpose statement. Students practice with the Design Recipe and writing quality Purpose Statements. This can be done with their usual coding partner, a new partner, a station review, or another format that suits the class.

### Launch

Students should have their workbook, pencil, and be logged into code.pyret.org on their computer.

Students will use the Purpose Statement organizer (Page 50) and the Design Recipe worksheets to work through different practice problems from workbook.

 Strategies for Reading Comprehension MLR 6: 3 Reads - In pairs, the word problem is read 3 times. Students will document their work in the "3 Reads/Stronger & Clearer" handout. - 1st Read: Teacher reads the word problem. Without any pencil or pen, students discuss: What is the problem about? - 2nd Read: Partner A reads. Students discuss: What are the quantities? - 3rd Read: Partner B reads. What is a good purpose statement? MLR 1: Stronger and Clearer Each Time - Using the "3 Reads + Stronger & Clearer" handout, students will switch partners 3 times. - Response 1: Write (and/or draw!) your understanding of the word problem. - Structured Meetings: Meet with another student, and share 1st drafts. Ask clarifying questions and make suggestions of one another, taking notes (repeat with additional meetings as necessary). - Response 2: Write a second draft, demonstrating your understanding of the word problem.

Students may choose to use the programming environment to test out their functions or experiment with different strategies. Encourage students to try different strategies and debug their own programs as much as possible.

• What strategies did you find the most helpful in solving these problems? Encourage student discussion while making notes of preferred strategies on the board.

• Did any groups disagree on how to solve a problem? What did you do to resolve this?

• *How can reading a word problem three times help you? Helps you to slow down and comprehend, makes time to look for information, gives you a chance to catch something you missed the first time, etc.

• Where else can you use the strategies we practiced today?

### Investigate

Have students break into teams of 2-4, and use the Design Recipe to solve at least three word problems. We recommend using some of the sample word problems provided in the workbook (see below), but you can also grab any word problem from your math book in which students must define a functional relationship.

There are more pages of problems that focus on geometry and linear functions in the additional exercises section at the end of this lesson.

Optional: Ask students to create their own appropriately challenging word problem (with a solution) and collect the responses for later use as "Do Now" tasks or formative assessment.

### Synthesize

Which step in the Design Recipe are students feeling the most confident about? The least? At this stage, it is normal for students to feel most confident about the Contract and Examples, and the least confident about Purpose Statements and Definitions.

## 🔗Design Recipe Games 20 minutes

### Overview

The Design Recipe is essentially a systematic way to formalize an unstructured word problem into a structured solution, and each phase formalizes it more than the one that came before it. These activities help students focus on the rigor of each step, and the way those steps are connected. The strategies introduce here can be used in later lessons, and we strongly recommend using at least one of them for every subsequent lesson!

### Launch

The Design Recipe makes it possible to solve a problem in pieces, and to see how those pieces fit together. For hard problems, knowing how the parts fit together will let you use each step to help you write the next one.

These two activities will involve relatively easy word problems, so the challenge isn’t about solving them! It’s figuring out how the pieces fit together and making sure all of the solutions make sense. Once you know how everything fits together, you’ll be able to make fewer mistakes - and even check your work when you do!

### Investigate

Design Recipe Telephone

1. Divide the class into groups of three.

2. Choose three word problems (we’ll call them Problems A, B and C) to give to each group. You can use ones from your textbook, or any of the practice word problems in the workbook that students haven’t solved before.

3. In every group, each student is given their own word problem. Student 1 writes the Contract and Purpose for Problem A, Student 2 writes the Contract and Purpose for Problem B, and so on.

4. Once they’re done, students should get rid of the word problems by handing them back to the teacher, folding them over, etc. Then they pass their paper to the right so that Student 1 is now looking at the Contract and Purpose for Problem C, Student 2 is looking at the Contract and Purpose for Problem A, and Student 3 is looking at Problem B.

5. Based solely on the Contract and Purpose, each student must now write two Examples, as well as circle and label what is changing. If the Contract and Purpose don’t provide enough information, they pass the paper back and the original author has to re-do them.

6. Once they’re done, students get rid of the Contract and Purpose by folding them over. Then they they pass their paper to the right again, so that Student 1 is now looking at the Examples for Problem B, Student 2 is looking at the Contract and Purpose for Problem C, and Student 3 is looking at Problem A.

7. Based solely on the Examples (and the circles-and-labeled variables), students must derive the function definition. If the Examples don’t provide enough information, they pass the paper back and the original author has to re-do them.

This activity can be repeated several times, or done as a timed competition between teams. The goal is to emphasize that each step - if done correctly - makes the following step incredibly simple.

Where’d You Get That?

Divide the class into pairs, giving each pair two word problems (the whole class can use the same set, or different ones), and have students solve one problem each independently. Once finished, students take turns challenging each other. The Challenger always starts at the bottom of the page, physically pointing to one part of the function definition and asking "where’d you get that?" The Defender has to physically point to some location in the Examples, and explain exactly how they got that part of the definition. This is repeated for every other step in the recipe, as students work their way back to the original word problem. For example:

• Challenger (pointing at variable in the Definition): Where’d you get that?

• Defender (pointing at label in the Examples): Well, I circled the parts of the Examples that change, and gave them that label.

• Challenger (pointing at the label): OK, but where did you get the label?

• Defender (pointing at Purpose Statement): I used that term in the Purpose Statement.

• Challenger (pointing at Purpose Statement): Where’d you get that term?

• Defender (pointing to Word Problem): I got it from reading the Word Problem.

### Common Misconceptions

Mathematically confident students will actively resist these activities, because they may be used to having the answer come to them almost as soon as they finish reading the word problem (this is the same objection those students have to explaining "how they got the answer").

### Synthesize

The Design Recipe is a way of slowing down and thinking through each step of a problem. If we already know how to get the answer, why would it ever be important to know how to do each step the slow way?

Sample Responses:

• Someday we won’t be able to get the answer, and knowing the steps will help

• So we can help someone else who is stuck

• So we can work with someone else and share our thinking

• So we can check our work