Lesson 15: Project - Make a Recommendation


To conclude this unit, students design a recommendation engine based on data that they collect and analyze from their classmates. After looking at an example of a recommendation app, students follow a project guide to complete this multi-day activity. In the first several steps, students choose what choice they want to help the user to make, what data they need to give the recommendation, create a survey, and collect information about their classmates' choices. They then interpret the data and use what they have learned to create the recommendation algorithm. Last, they use their algorithms to make recommendations to a few classmates. Students perform a peer review and make any necessary updates to their projects before preparing a presentation to the class.


This project serves as an assessment for the second chapter of the unit. Students should demonstrate that they can apply the data problem solving process to a problem or domain that they are interested in. Students complete many of the same activities, but linked together in one comprehensive project. For example, students have previously used cross tabulation to find relationships between preferences and have created recommendation algorithms, but in this project, they will use the relationships that they find in the data to create their algorithms. The last step in the activity is intentionally vague on how students will present their work so that you may choose the method that makes the most sense for your classroom.

Assessment Opportunities

Use the project rubric attached to this lesson to assess student mastery of learning goals of this unit. You may also choose to assign the post-project test through Code Studio.


Lesson Modifications

Warm Up (10 mins)

Activity (150 mins)

Wrap Up (10 mins)

Programming Extension (120 mins)

View on Code Studio


Students will be able to:

  • Apply the data problem solving process to a personally relevant topic
  • Determine appropriate sources of data needed to solve a problem


  • Print copies of the project guide
  • Print copies of the rubric
  • Print copies of the peer review guide


Heads Up! Please make a copy of any documents you plan to share with students.

For the Teachers

For the Students

Teaching Guide

Lesson Modifications

Attention, teachers! If you are teaching virtually or in a socially-distanced classroom, please read the full lesson plan below, then click here to access the modifications.

Warm Up (10 mins)

Teaching Tip

A quick review: This quick review serves to remind students of the types of problems that they can solve with data before they move onto defining their own data problem. Students should move into working on the project as soon as possible.

Review: Quickly review the different problems that students have seen in the chapter so far:

  • Which pizza should we order?
  • Which ice cream should we choose?
  • What video should WebPix recommend?
  • Which route should a driver take?
  • Which product should Nyle recommend?

Point out that every data decision so far involves a recommendation or prediction, and introduce the project, in which students will use data to make a recommendation for a topic of their choice.


We've looked at many different types of data problems, but they all have to do with making recommendations (such as the Top Video) or predictions (such as the shortest route). Today, you're going to have a chance to use data to make your own recommendation, based on something that you are interested in.

Activity (150 mins)

Teaching Tip

If students look at the code, most of it should be comprehensible. The majority of the code works by sending users to new screens, which the students should remember from Unit 4. The app also adds points to different vacation choices as the user clicks on different buttons. This type of functionality should be familiar to students from Unit 3. The only unfamiliar code should be the "recommend()" function, which finds the choice with the most points, then sends the user to that choice's screen.

Solve a Data Problem

Group: This project can be completed individually, but it is recommended that students work in pairs or at most groups of 3.

Distribute: Give students copies of the project guide and review the instructions on the top of first page with students.

The Sample App

Send students to look at the sample app.

You may choose to ask students to look at the code, or just take the quiz to see how it works from the user perspective.

Discussion Goal

The first two questions are fairly straightforward. The app helps the user to choose a vacation spot, and it uses data about the user's food, superpower, and animal preferences.

The next question asks students to think about how algorithms are chosen. In a previous lesson, students designed an algorithm for this app by looking at cross tabulation tables for people who had expressed different preferences. Remind students that the creators can use data they have collected to create their algorithm, rather than just making up their rules from their assumptions about the world.

Prompt What choice does the app help the user to make? What data does it use to make that recommendation?

Prompt How do you think the creators of the app decided on the algorithm that they use to make the choice?


In this project, we're going to use the data problem solving process to help us create our algorithm. We'll survey people to find the relationships between their preferences, then use what we've learned to create an algorithm that can recommend something to the user. First, you and your partner should think about the type of recommendation that you want to make, and the three questions that you will ask to help you make that recommendation.


Step 1 - Define Your Problem: Give students a few minutes to decide on their recommendation topic with their partner.

Teaching Tip

The lesson plan assumes a very rigid structure for the algorithm, with four possible recommendations based on three multiple choice questions, each with four answer choices. You may want to give students more freedom in creating their survey and algorithm.


Step 2 - Decide What Data You Need

Give students time to think of the data that they need to help them make the recommendation to the user.

Step 3 - Create Your Survey

Once students have decided on the data, they should put it in survey form. In the initial survey, they will also need to include a question that asks about what they plan to recommend (e.g. a vacation spot). They will use this data to make connections between a user's stated preferences and what they will eventually recommend.

Teaching Tip

When to Break: After Step 3 or Step 4 is a good place to break after a first day. Collecting Project Guides at this point will allow you to look over them for any issues that could cause problems for students in the next portion of the lesson. Students may also use this time to collect survey data from people outside the classroom.

Step 4 - Collect Your Survey Data

Students should give the survey to at least twenty people, in order to make sure there is enough data to interpret in the next step.

Step 5 - Interpret Your Data

Guide students in using cross tabulation to find relationships between the different user preferences. If students are having trouble with this part of the project, you may want to share the exemplar with them or complete a few tables as a class.

Teaching Tip

This step is slightly different from the algorithm assignment earlier in the chapter. Make sure students understand that they should be creating rules based on the survey data that they have collected and interpreted, not what they believe to be true about the world.

Step 6 - Define Your Algorithm

Students use the relationships to create rules for their recommendation algorithm.

Teaching Tip

Another Break: Just before Step 7 is another ideal place for a break. Collect students' project guides and again do a quick check-in to make sure students are on track.

Step 7 - Try Out Your Algorithm

Give students time to use their algorithm to make a recommendation to three of their classmates, then reflect on whether they believe the algorithm is effective.

Peer Review

Distribute: peer review worksheet Make a Recommendation - Peer Review

Step 8 - Peer Review: Students should complete this peer review for another student's project guide.


Teaching Tip

What kind of presentation? The presentation can take any form you think best for your class: slides, poster, paper, etc. Feel free to update the presentation rubic to fit your exact needs.

Step 9: Students should incorporate their peer feedback by making edits in their project guides. Students should then design some kind of presentation of their work to share with their classmates. While you may choose many different formats, suggested content for the presentation is provided.

Wrap Up (10 mins)

Collect: The rubric is designed to help grade the completed project guide, presentation, and peer review rubric.

Discussion Goal

Goal: These prompts are one way you could bring the whole unit to a close. Students have explored the data problem solving process and now should be able to reflect more broadly on the implications of its widespread application. Many services students use every day and that make their lives easier or more interesting involve data problem solving. They have probably seen by now, however, that a lot of information about them, including information they didn't realize they were providing, is being collected. This final journal is a chance to reflect on these and other tradeoffs they've seen in this chapter.

Journal: To close the unit either as a full class discussion or individual journal reflection ask students to write about

  • What's one thing you like about the way data is being used to solve problems in your life?
  • What's one thing you either don't like or concerns you about how data is being used to solve problems in your life?

Send students to Code Studio to complete their reflection on their attitudes toward computer science. Although their answers are anonymous, the aggregated data will be available to you once at least five students have completed the survey.

Programming Extension (120 mins)

Students can also "Remix" the sample app to create their own recommendation app based on this project.

The following will need to be altered in order for the student apps to work.

In Design Mode:

  1. Change the "intro" screen to reflect the new topic.
  2. Change the text on the three "question" screens to reflect the new questions.
  3. Change the answer choices on each "question" screen.
    • Students may choose a text button or an image.
    • Each answer's element id will need to be changed, or the old element deleted and a new element created.
  4. Change the "choice" screens to reflect the new recommendation choices.
    • Change the text and the image.

In Code Mode:

  1. Change the variable names of the choices.
  2. Change the rules to use the new variables and reflect the student's algorithm.
  3. In the rules for Question 3, update the list of choices passed to the "recommend()" function.
View on Code Studio
View on Code Studio

Sample App

Here is an example of an app that uses data to help the user solve a problem. With a partner, play through the app a few times to see how it works.

Discuss the following questions with your partner:

  • What choice does the app help the user to make?
  • What data does it use to make that recommendation?
  • How do you think the creators of the app decided on the algorithm that they use to make the choice?
  • Reflection
  • 3
  • (click tabs to see student view)
View on Code Studio

Student Instructions

This level is an assessment or survey with multiple questions. To view this level click the "View on Code Studio" link.

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
  • 2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
  • 2-AP-15 - Seek and incorporate feedback from team members and users to refine a solution that meets user needs.
  • 2-AP-18 - Distribute tasks and maintain a project timeline when collaboratively developing computational artifacts.
DA - Data & Analysis
  • 2-DA-08 - Collect data using computational tools and transform the data to make it more useful and reliable.
IC - Impacts of Computing
  • 2-IC-23 - Describe tradeoffs between allowing information to be public and keeping information private and secure.