Unit5

Unit 5 - Lists, Loops, and Traversals

Unit Overview

Students learn to build apps that use and process lists of information. Like the previous unit, students learn the core concepts of lists, loops, and traversals through a series of EIPM lesson sequences. Later in the unit, students are introduced to tools that allow them to import tables of real-world data to help further power the types of apps they can make. At the conclusion of the unit, students complete a week-long project in which they must design an app around a goal of their choosing that uses one of these data sets.

Teaching Tip

Modifications for Virtual and Socially-Distanced Classrooms

Are you teaching in a virtual setting or in a socially-distanced classroom? Check out this document for ideas and resources to help you tailor common practices like Think Pair Share or Peer Feedback to your learning environment.

For an overview of EIPM modifications, read through the EIPM Modifications document before reading the lesson-specific modifications within Lesson Plans.

Learn more about how to use these resources here.

Unit Philosophy and Pedagogy

  • Independent Creation and The Hackathon Project: Much like the project in Unit 4, the "Hackathon" project in this unit is designed as an opportunity for students to creatively and independently build something with their programming skills. While students are asked to include some technical requirements in their program to ensure they demonstrate mastery of new programming concepts, they have free rein to choose the goals, design, and implementation of their project. To avoid asking students to complete a major programming project right before the Create PT, this hackathon is the most "Create-PT-like" project of the course. It's the best chance for students to practice skills like budgeting time or scoping an open-ended project. In many classrooms, if you maintain the recommended pacing of the course, this project serves as an excellent end to the first semester.

  • Growing Comfort with EIPM: By Unit 5, students (and teachers!) should be developing greater comfort with the flow of EIPM lessons. Students may begin to anticipate that sequences are building towards an independent Make lesson, or look forward to stepping away from computers to Explore. A nice feature of EIPM is that you'll find strategies and modifications to each lesson type that work best for your students. Keep an eye out for how you and your students are developing comfort with EIPM, and note strategies that help meet the needs in your classroom.

  • Programming with Real-world Data: The Data Library is a new feature in App Lab for the 2020-21 school year and was designed to let students program with data from the real-world. The goal of this tool is to motivate students to build new kinds of data-powered apps that they find personally interesting. This tool also facilitates programming with lists of information, since students will need to manipulate lists of data in order to incorporate the different data sources. Encourage students to use datasets they find personally relevant as they draw on their creative ideas for bringing data to life.

Major Assessment and Projects

The unit project asks students to spend five days as part of a "Hackathon" project that they have nearly complete independence to scope and design. Students must choose one dataset from the Data Library in AppLab to be a component of their project to demonstrate what they have learned about lists and list processing; otherwise, scoping the project is completely up to them. Students submit their app, project guide, and written responses to reflection questions about how the app is designed and the development process they used to make it. Students will also complete an end-of-unit assessment aligned with CS Principles framework objectives covered in this unit.

AP Connections

This unit and unit project helps build towards the enduring understandings listed below. For a detailed mapping of units to Learning Objectives and EKs please see the "Standards" page for this unit.

  • CRD-2: Developers create and innovate using an iterative design process that is user-focused, that incorporates implementation/feedback cycles, and that leaves ample room for experimentation and risk-taking.
  • AAP-1: To find specific solutions to generalizable problems, programmers represent and organize data in multiple ways.
  • AAP-2: The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.
  • AAP-3: Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

This unit includes content from the following topics from the AP CS Principles Framework. For more detailed information on topic coverage in the course review Code.org CSP Topic Coverage.

  • 3.2 Data Abstraction
  • 3.4 Strings
  • 3.8 Iteration
  • 3.10 Lists
  • 3.16 Simulations

The College Board has supplied formative Create PT questions to help prepare students to complete the Create Task. We recommend that students complete the following prompts with the unit project. More information can be found in Code.org CS Principles Topic Coverage.

  • 3.b.i
  • 3.b.ii
  • 3.b.iii
  • 3.b.iv
  • 3.b.v

Week 1

Lesson 1: Lists Explore

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (30 mins)
  • Wrap Up (10 mins)

Develop a mental model for how computers store and access lists of information.

Teacher Links: Presentation

Lesson 2: Lists Investigate

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Investigate and modify sample apps that use lists learn common programming patterns with lists.

Teacher Links: Presentation

Lesson 3: Lists Practice

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Practice programming with lists through a set of programming puzzles.

Teacher Links: Presentation

Lesson 4: Lists Make

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Make an app that uses lists and programming patterns with lists.

Teacher Links: Presentation Students Links: Activity Guide

Lesson 5: Loops Explore

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (30 mins)
  • Wrap Up (10 mins)

Develop a mental model for how computers repeat instructions over and over using loops.

Teacher Links: Presentation |

Week 2

Lesson 6: Loops Investigate

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Investigate and modify sample apps that use loops and learn common programming patterns with loops.

Teacher Links: Presentation

Lesson 7: Loops Practice

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Practice programming with loops through a set of programming puzzles.

Teacher Links: Presentation

Lesson 8: Loops Make

App Lab

  • Lesson Modifications
  • Warm Up (2 mins)
  • Activity (38 mins)
  • Wrap Up (5 mins)

Practice making an app that uses loops and programming patterns with loops.

Teacher Links: Presentation Students Links: Activity Guide

Lesson 9: Traversals Explore

App Lab

  • Lesson Modifications
  • Warm Up (5 mins)
  • Activity (30 mins)
  • Wrap Up (10 mins)

Develop a mental model for how computers use loops to traverse and process lists of information.

Teacher Links: Presentation |

Lesson 10: Traversals Investigate

App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Investigate and modify sample apps that use traversals.

Teacher Links: Presentation

Week 3

Lesson 11: Traversals Practice

App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (35 mins)
  • Wrap Up (5 mins)

Practice programming with list traversals through a set of programming puzzles.

Teacher Links: Presentation

Lesson 12: Traversals Make

App Lab

  • Lesson Modifications
  • Warm Up (2 mins)
  • Activity (40 mins)
  • Wrap Up (5 mins)

Practice making an app that processes a list from a data set using traversal.

Teacher Links: Presentation Students Links: Activity Guide

Lesson 13: Project - Hackathon Part 1

Project | App Lab

  • Lesson Modifications
  • Warm Up (3 mins)
  • Activity (40 mins)
  • Wrap Up (2 mins)

This is the first day of a five-day unit project. Students begin the project by choosing a partner, determining a dataset to design the app around, and creating a paper prototype.

Teacher Links: Presentation Students Links: Activity Guide | Written Response

Lesson 14: Project - Hackathon Part 2

Project | App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (40 mins)
  • Wrap Up (5 mins)

This is the second day of a five-day unit project. Students continue to plan for the project by filling out tables of information on element IDs and programming constructs before each tackling a different role in the project as a designer or a programmer.

Teacher Links: Presentation Students Links: Activity Guide

Lesson 15: Project - Hackathon Part 3

Project | App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (40 mins)
  • Wrap Up (5 mins)

This is the third day of a five-day unit project. Students continue to build their apps.

Teacher Links: Presentation Students Links: Activity Guide

Week 4

Lesson 16: Project - Hackathon Part 4

Project | App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (40 mins)
  • Wrap Up (5 mins)

This is the fourth day of a five-day unit project. Students continue to build their apps.

Teacher Links: Presentation Students Links: Activity Guide

Lesson 17: Project - Hackathon Part 5

Project | App Lab

  • Lesson Modifications
  • Warm Up (0 mins)
  • Activity (40 mins)
  • Wrap Up (5 mins)

This is the final day of a five-day unit project. Students complete a Written Response, individually answering prompts about the project. Students then share their apps during a gallery walk.

Teacher Links: Resource | Presentation Students Links: Activity Guide | Written Response

Lesson 18: Assessment Day

Project

  • Lesson Modifications
  • Assessment (25 mins)
  • Assessment Review (20 mins)

Assessment day to conclude the unit.

Teacher Links: Presentation