
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Grade
- Middle school (Grades 6-8)High school (Grades 9-12)Adults & educators (Higher education and teacher learning)
- Ages
- Ages 11+
- Duration
- 1 hour
- Level
- Intermediate
How can lists and list methods help us organize, manipulate, and retrieve data effectively in computer programs?
Overview
In this intermediate computer science lesson, students assist the fictional CodingMine software team in developing veterinary software for an animal hospital. Learners explore Python lists as data structures to organize collections of items, understand zero-based indexing, and apply naming conventions using underscores.
Within the Minecraft environment, students bring these programmatic concepts to life by categorizing animals and spawning them into specific enclosures, adjusting dog diets with append and pop to deliver meals, and manipulating lists of cat names using sort and reverse to identify specific pets.
Learning objectives
By the end of this lesson students will be able to:
- Define a Python list using square brackets and appropriate underscore naming conventions.
- Apply zero-based numbering to access and update specific elements within a list.
- Modify list contents using the append and pop methods to handle diverse requirements.
- Organize list items using the sort and reverse methods to retrieve specific values.
- Spawn mobs at designated locations using list-driven code.
Blocks and items used in this lesson
Key vocabulary
- List
- A collection of strings, numerical values, variables, mobs, or items enclosed in square brackets.
- Zero-based numbering
- A numbering scheme where the first position in an indexed list is designated as zero.
- Append
- A list method used to add a new element to an existing list.
- Pop
- A list method used to remove an element from an existing list.
- Sort
- A list method that arranges items into alphabetical or numerical order.
- Reverse
- A list method that inverts the current order of elements in a list.
Before class
Lesson sequence
Suggested timing: about 60 minutes in total.
- Warm-up and Introduction10 min
Introduce the lesson scenario: students are aiding CodingMine to build software for an animal hospital. Present the key concepts of lists, square bracket syntax, using underscores in names, and the concept of zero-based numbering using the classroom presentation.
- Activity 1: Animal Categorizing15 min
Guide students to construct a list of animals in Python. Students write code to spawn the different animal mob types into their matching pens at predetermined coordinates.
- Activity 2: Dietary Requirements15 min
Students program a food-making machine that caters to three dogs with unique diets. Students apply the append method to add vitamins for the second dog, use the pop method to remove beef for the third dog, and drop the resulting food into the dog bowls.
- Activity 3: What is the Cat's Name?15 min
Students assist a data scientist by writing code to modify a list of cat names. They update the final name to Shadow, sort the names alphabetically, reverse the list order, and output specific names in chat using positional index values to select the correct cat from the line-up.
- Reflect and Review5 min
Facilitate a short recap asking students to recall list syntax, method functions (reverse, append, sort, pop), and naming rules to reinforce key takeaways.
Assessment: success criteria
- Student constructs a valid list enclosed in square brackets with underscore naming.
- Student spawns correct mob types into designated animal pens.
- Student accurately updates dog food lists using append and pop methods.
- Student sorts, reverses, and accesses cat names by positional value in chat.
Differentiation
Provide an index reference chart showing zero-based position counts and examples of square bracket syntax.
Have students predict the exact chat output of combined sorting and reversing operations before running their code.
Knowledge check
5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.
1What punctuation marks are placed around the contents of a Python list?
Answer: C. Python lists use square brackets to enclose their elements.
2What character should be used instead of a space when creating variable or list names?
Answer: B. Underscores are used in place of spaces when defining variable and list names.
3Which method is used to remove an ingredient from the dog food list?
Answer: A. The pop method removes an item from a list.
4What method would you use to organize a list of cat names alphabetically?
Answer: D. The sort method orders list items alphabetically or numerically.
5What numbering system starts counting element positions at index 0?
Answer: A. Python uses zero-based numbering, meaning the first index position is 0.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- Python 101-Lesson 4: Animals are FriendsEDU Guide
- Python 101-Lesson 4: Animals are FriendsPresentation
- Programming with PythonCurriculum Overview
- Lesson worldOpens the world page in Minecraft Education (sign-in with a school account may be needed).
Part of the Python 101 curriculum
This is lesson 4 of 10 in Python 101.
- Python 101 with MakeCode - Lesson 1
- Python 101 with MakeCode - Lesson 2
- Python 101 with MakeCode- Lesson 3
- Python 101 with MakeCode - Lesson 4
- Python 101 with MakeCode - Lesson 5
- Python 101 with MakeCode - Lesson 6
- Python 101 with MakeCode - Lesson 7
- Python 101 with MakeCode - Lesson 8
- Python 101 with MakeCode - Lesson 9
- Python 101 with MakeCode - Lesson 10
Frequently Asked Questions
What prior experience do students need for this lesson?
This is an intermediate-level Python lesson designed for students aged 11 and up, typically following Lessons 1 through 3 in the Python 101 unit.
What methods are taught in this lesson?
Students learn and apply four distinct list methods: append, pop, sort, and reverse.
Where can the lesson slides be accessed?
The step-by-step classroom presentation is located in the Supporting Files section alongside the Curriculum Overview.
Adapted from Python 101 with MakeCode - Lesson 4 by Minecraft Education on Minecraft Education, last updated Feb 4, 2025. This classroom version, the timings and the quiz were written by 9Minecraft Education.























