Skip to content
PlayOwl

Coding · Grade 7

Python Functions and Data Structures

Learners extend their list skills with insert, remove, pop, slicing, in and sorting, then meet dictionaries for looking values up by key, including tallying with counts. They see how functions interact with mutable lists and dictionaries, and decide when a list, a dictionary or a combination of both best fits a task.

  • 4 lessons
  • About 85 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, put code in order, trace code, type a number, sort into groups and true or false
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Use list operations: insert, remove, pop, slicing, in, sorted() and sort().
  • Create, look up, update and loop over dictionaries, and avoid KeyErrors with in or get().
  • Write functions that take and return lists and dictionaries, and predict when a function changes the caller's data.
  • Choose a list, a dictionary or a combination for a task and justify the choice.

Lessons

  1. More tools for lists 7 steps4 practiceabout 20 min
  2. Dictionaries: look things up by key 6 steps4 practiceabout 22 min
  3. Functions that work with lists and dictionaries 6 steps4 practiceabout 20 min
  4. Choosing the right data structure 5 steps3 practiceabout 16 min
  5. Check what you learned 8 questions at the end

Keep exploring

Games to practice with

More 7th grade coding

Guide for grown-ups