Authentic Lessons for 21st Century Learning

Junk Food Junction: What's Your Function?

What is a Function?

Brittany VanCleave, Amber Stokes | Published: May 28th, 2025 by K20 Center

  • Grade Level Grade Level 8th, 9th
  • Subject Subject Mathematics
  • Course Course Algebra 1, Pre-Algebra
  • Time Frame Time Frame 2-3 class period(s)
  • Duration More 110 minutes

Summary

“Junk Food Junction: What’s Your Function?” breaks down the components of a function and the relationship it has in real-world contexts. The goal is to identify different variables of the given function, either by equation or graph. Participants will identify domain, range, independent, and dependent variables of a function.

Essential Question(s)

How can you represent and describe functions?

Snapshot

Engage

Students brainstorm ideas for a vending machine.

Explore

Students discover patterns by playing the Function Machine game.

Explain

Students develop an understanding of the components of a function: domain, range, independent variables, and dependent variables.

Extend

Students create advertisements for their vending machines, incorporating the various function components.

Evaluate

Students engage in a Gallery Walk to view other students' advertisements and evaluate the functions for the various vending machines.

Materials

  • Lesson slides (attached)

  • 3-2-1 handout (attached; one half sheet per student)

  • Function Machine handout (attached; one per student)

  • Function Machine Levels handout (optional; attached; one per student)

  • Vending Machine Gallery Walk handout (attached; one per student)

  • Copy paper, or copies of the Vending Machine Advertisement handout (attached; one sheet per student)

  • Markers or colored pencils

  • Sticky notes (one per student)

  • Devices with Internet access

Engage

15 Minute(s)

Using the attached Lesson Slides, display slide 5 and discuss the following question with students: If you could create any vending machine, what three products would you include, and how much would they cost?

Move to slide 6 and pass out a copy of the 3-2-1 handout to each student. Students will work individually to brainstorm ideas for their own vending machines, using the 3-2-1 instructional strategy prompts to help guide their thinking. Students should consider what products they want to sell and the cost of those products. Encourage students to also think about the more unique aspects of the machine, such as the colors, lighting features, and payment methods.

Explore

25 Minute(s)

Display slide 7 and assign each student a partner. Pass out the attached Function Machine handout to each student and explain to pairs that will also need to have a device to access the internet. 

Have students access the Function Machine game from the Math Playground website. Walk students through how to set up the game and play a round or two with them until they feel comfortable navigating the game independently. Give the pairs time to play three or four more rounds on their own. As they play, have them write their input, output, and the function on the handout.

Explain

25 Minute(s)

After students have had opportunities to play a few rounds of the Function Machine game, come back together for a whole-class discussion. 

Move to slide 8 and ask each pair to discuss the different functions they created. Then, have them respond to the following question: “Based on your experience with the Function Machine activity, how would you define ‘function?’”

Write student answers on the board, and then, as a whole class, narrow down the ideas into a few bullet points.

Once students have defined the word “function,” display slide 9 and review the provided definition. Ask students to compare it with the definition they created. Now that you have a working definition of a function, it's time to dive into the components of a function. 

Explain to students that since they now understand what the word function means, they will learn about the components of a function. Move to slide 10 where there is a chart set up with one column being the domain and the other being the range. Begin by reviewing the provided definition for domain, then have students work together to create class definition for domain in their own words. Once they have created their own definition, have students share out their answers to the example question provided on the slide. Repeat this process with range. 

Display slide 11 and once again, repeat a similar process to define "independent variable" and "dependent variable."

Extend

30 Minute(s)

Display slide 12 and pass out the attached Vending Machine Advertisement handout to each student. Have students  return to the vending machine ideas that they proposed on their 3-2-1 handout. Explain that they will be creating an advertisement for their vending machine. Advertisements should include all of the following:

  • The name of the vending machine

  • A picture of the vending machine

  • A description of the product being sold

  • The cost of the products

  • A pitch explaining why someone would want to buy the products

Emphasize the importance of the product and cost in students' advertisement design. Let them know that they will be identifying the domain, range, independent variable, and dependent variable for their peers' (function) vending machines. So, they need to include enough information to enable other students to write a function based on their products. Provide the following example: "If I put one dollar in, I get two pieces of candy. If I put two dollars in, I get four pieces of candy."

After students have had time to work on their advertisements, pass out a sticky note to each student. Ask students to write down the function for their own machines, and then put the sticky note away for use as an answer key later in the lesson.

Evaluate

15 Minute(s)

Display slide 13 and pass out the attached Vending Machine Gallery Walk handout. 

Have class members post their completed advertisements on the wall around the room or display them on their devices. Students will complete a Gallery Walk to evaluate other students' vending machine creations by identifying the domain, range, independent variable, and dependent variable. Students will also create a function based on the input and the output of each vending machine. Walk students through an example by filling out the top line of the handout as the following: 

  • Name: Chips, Chips, Chips! 

  • Domain: $2, $4, $6, $8

  • Range: 1, 2, 3, 4 bags of chips

  • Independent Variable: Dollars

  • Dependent Variable: Bags of Chips

  • Function: C = D/2 

Review the examples with students and make sure to clarify and answer any questions for them. Then, have them participate in the Gallery Walk. 

When students have finished filling in their handouts, conclude the lesson by having students get out their sticky notes and share the functions for their own vending machines in order for the other students to check their work.

Resources