Data Abstraction Hack Homework

📝 Data Abstraction Hack (10 minutes)

Instructions

In this activity, you’ll learn how lists manage data and reduce complexity in programs. Follow these steps:

  1. Edit the students list to use your own names (friends, classmates, etc.).
  2. Edit the scores list to assign each student a score of your choice.
  3. Save and refresh the page in your browser to see how the output changes automatically.
  4. After experimenting with students and scores, complete the 🚀 Hack Challenge at the bottom.
  5. To make edits, open VS Code and find the file at notebooks/csp/big-ideas/2025-09-26-bigidea32homework.ipymd.

Class Roster Output:

🚀 Hack Challenge

Now that you’ve practiced with students and scores, it’s your turn! Create one new list of your choice.

✅ Ideas:

  • A list of favoriteFoods
  • A list of cities you want to visit
  • A list of videoGames you enjoy

After creating your new list, write a loop to print each element to the page.

// Example structure:
let favoriteFoods = ["Pizza", "Burgers", "Sushi"];

for (let i = 0; i < favoriteFoods.length; i++) {
  console.log(favoriteFoods[i]); // Replace console.log with output to the page if you like
}
  

💡 Hint: Use the same pattern you saw with students and scores.