# Lists > Ninth graders store many values in one variable with a list. Some operations change the list (append, remove, sort); others just read it (len, indexing, in)… **Computer Science** | **Grade 9** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g9-cs-lists.html* Ninth graders store many values in one variable with a list. Some operations change the list (append, remove, sort); others just read it (len, indexing, in). They sort operations by whether they change the list, then build and process a list. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Create and index a **list**. - Tell **changing** from **reading** operations. - Add, remove & **sort** items. - Loop over a list. How do programs store and work with many values at once? ## Changes the List, or Just Reads It? Project this and sort each list operation into Changes the list or Reads it (no change). ## 55 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — One Box, Many Values How would you store 30 names in code? #### 👩‍🏫 Teacher Moves - Show 30 separate variables. - Ask for a better way. - Set the goal. #### 🎒 Student Actions - Look. - Guess. - Get ready. ### Use — Lists Students use lists. #### 👩‍🏫 Teacher Moves - Send students to Changes or Reads? - Sort each operation. - Note changing vs reading. #### 🎒 Student Actions - Sort. - Say. - Note it. ### Modify — Modify the List Students modify. #### 👩‍🏫 Teacher Moves - Append then remove an item. - Sort the list. - Index the 2nd item. #### 🎒 Student Actions - Append. - Sort. - Index. ### Create — Build Students create. #### 👩‍🏫 Teacher Moves - Make a list of 5 items. - Add one and remove one. - Loop over it and print each. #### 🎒 Student Actions - Make. - Edit. - Loop. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - Name a changing operation. - Name a reading operation. - Complete the exit ticket. #### 🎒 Student Actions - Name one. - Name one. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students. Create prototypes that use lists to solve problems. Combine control structures with data to express ideas. Evaluate and refine computational artifacts. Organize data to build solutions. ## One lesson, every learner ### Multilingual Learners - Use a numbered row of boxes. - Label index positions. - Act out append/remove. ### Support & Access - Use a 3-item list. - Index the first item only. - One operation at a time. ### Stretch & Extend - Use 2D lists (a grid). - Sort with a key. - Build a list from user input. ### What to gather - 📽️Screen / board - 📋Operation cards - 💻Changes or Reads? - 🐍Python / editor - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **list**: an ordered collection of values - **element**: one item in a list - **index**: an item position (starting at 0) - **append**: add an item to the end - **remove**: delete an item - **sort**: put items in order - **length**: how many items (len) - **mutable**: a list can be changed in place ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: lists. Have students build a 5-item list, then add one and remove one. A printable lists worksheet is in the Computer Science library. ## Check your understanding **1. What does “list” mean?** - an ordered collection of values *(correct)* - how many items (len) - an item position (starting at 0) - put items in order “list” means: an ordered collection of values **2. Which word means: “one item in a list”?** - length - list - element *(correct)* - index “element” means: one item in a list **3. What does “index” mean?** - an ordered collection of values - an item position (starting at 0) *(correct)* - how many items (len) - delete an item “index” means: an item position (starting at 0) **4. Which word means: “add an item to the end”?** - append *(correct)* - element - length - list “append” means: add an item to the end **5. What does “remove” mean?** - one item in a list - delete an item *(correct)* - a list can be changed in place - how many items (len) “remove” means: delete an item **6. Which word means: “put items in order”?** - mutable - sort *(correct)* - list - index “sort” means: put items in order ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g9-cs-lists.html All lessons: https://lessonplans.k12academics.com/