# Arrays & Lists > Eighth graders store many values in one structure — an array or list. They learn to index items (counting from 0), find the length, and iterate over every… **Computer Science** | **Grade 8** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g8-cs-arrays.html* Eighth graders store many values in one structure — an array or list. They learn to index items (counting from 0), find the length, and iterate over every element. They match the key terms, 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… - Explain an **array / list**. - Use an **index** (from 0). - Find the **length**. - Iterate over elements. How do you store and work with many values at once? ## Match the List Term Project this and match each term to its meaning — tap the term, then tap the meaning. ## 50 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — One Name, Many Values How would you store a week of temperatures in code? #### 👩‍🏫 Teacher Moves - Show 7 separate variables. - Ask for a better way. - Set the goal. #### 🎒 Student Actions - Look. - Guess. - Get ready. ### Use — Arrays & Lists Students use the idea. #### 👩‍🏫 Teacher Moves - Send students to Match the List Term. - Match each one. - Note index starts at 0. #### 🎒 Student Actions - Match. - Say. - Note it. ### Modify — Change the List Students modify. #### 👩‍🏫 Teacher Moves - Read item at index 2. - Add and remove an item. - Find the length. #### 🎒 Student Actions - Read. - Edit. - Count. ### Create — Process It Students create. #### 👩‍🏫 Teacher Moves - Build a list of 5 values. - Iterate and print each. - Find the max or total. #### 🎒 Student Actions - Build. - Iterate. - Compute. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - Say the first index number. - Say what iterate means. - Complete the exit ticket. #### 🎒 Student Actions - Say it. - Say. - 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 clearly named variables that store data. Create procedures to reduce complexity with data. Use flowcharts/pseudocode to plan an algorithm. Organize data to build solutions. ## One lesson, every learner ### Multilingual Learners - Numbered row of boxes. - Label index positions. - Point to each element. ### Support & Access - Use a 3-item list. - Index the first item only. - One term at a time. ### Stretch & Extend - Use a 2D list (a grid). - Sum a list with a loop. - Search for a value. ### What to gather - 📽️Screen / board - 📋Term cards - 💻Match the List Term - 🐍Python / editor - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **array**: an ordered collection of values - **list**: a flexible, changeable collection - **index**: an item position (starting at 0) - **element**: one item in the collection - **length**: how many items it holds - **iterate**: visit each item in turn - **append**: add an item - **traverse**: go through every element ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: arrays & lists. Have students build a 5-item list and find its length. A printable arrays worksheet is in the Computer Science library. ## Check your understanding **1. What does “array” mean?** - how many items it holds - an ordered collection of values *(correct)* - add an item - one item in the collection “array” means: an ordered collection of values **2. Which word means: “a flexible, changeable collection”?** - append - iterate - list *(correct)* - length “list” means: a flexible, changeable collection **3. What does “index” mean?** - an ordered collection of values - go through every element - add an item - an item position (starting at 0) *(correct)* “index” means: an item position (starting at 0) **4. Which word means: “one item in the collection”?** - length - element *(correct)* - append - traverse “element” means: one item in the collection **5. What does “length” mean?** - a flexible, changeable collection - how many items it holds *(correct)* - an item position (starting at 0) - go through every element “length” means: how many items it holds **6. Which word means: “visit each item in turn”?** - index - append - list - iterate *(correct)* “iterate” means: visit each item in turn ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g8-cs-arrays.html All lessons: https://lessonplans.k12academics.com/