Lesson 3

Build a Smart Recommendation System

Mission: Create a simple recommender that suggests an item and explains the reason.

Mission Introduction

Students compare preferences and features to recommend a book, game, activity, study strategy, or project idea. The goal is to make the suggestion understandable, not mysterious.

What You Will Learn

  • How inputs and rules can create a recommendation.
  • Why explanations help users judge suggestions.
  • How to test a recommendation with different user choices.
  • How to improve a rule when the suggestion feels unfair or confusing.

Key Words

  • Recommendation
  • Preference
  • Feature
  • Rule
  • Score
  • Explanation

Quick Multiple-Choice Challenge

Teacher Demo

The teacher enters two different sets of preferences and shows how the recommendation and explanation change.

Open CodeHS Starter Code

Open the starter program, sign in if required, fork or copy the program, and return to this page for the tasks.

Open CodeHS Starter Code

Task Checklist

Hints

What should I recommend?
Pick a small set of choices, such as study tips, story genres, club activities, or game levels.
How do I write a good explanation?
Use one sentence that connects the recommendation to the user's choices.

Testing Challenge

Try three different user profiles. Write down whether the recommendation feels helpful, surprising, or confusing.

Boss Challenge

Your recommender should give a clear suggestion, explain the reason, and produce different results when the user's choices change.