Python for Kids · Class 8 · Module 5 of 9

Object-Oriented Thinking

Until now you used things Python provided. Now you invent your own.

8 sessionsSessions 33–40
4 weeksTypical pace
Foundation to IntermediateLevel
Class 8Python & Coding
A class blueprint producing three identical pet objects
The big idea

A class is a blueprint that bundles data and the actions that belong with it. One VirtualPet class can produce a hundred pets, each with its own name, hunger and mood, all sharing the same behaviour.

Why it matters

Object-oriented thinking is how large software is organised. Meeting it through a virtual pet makes an abstract idea immediately concrete.

Unpacked

What you will actually learn

Three core ideas, each taught with worked examples and then practised until it feels obvious.

01

Classes and objects

A class is the blueprint; an object is one thing built from it. The cookie cutter is not the cookie.

02

Attributes

Attributes are what an object knows — its name, its energy, its score. Each object keeps its own copy.

03

Methods

Methods are what an object can do, and they can change its own attributes. pet.feed() raises that pet’s energy and nobody else’s.

Did you know?

The Tamagotchi sold over 90 million units on exactly this logic: a few attributes, a few methods and a timer.

Common mix-up

“self is a magic word.” self is simply the object talking about itself — “my name”, “my energy” — and Python passes it in automatically.

Session by session

Your 8-session journey

Sessions 3340 of the 72-session year, at two one-hour sessions per week.

  1. 1

    Warm-up and big picture

    Where this module fits, what you will build, and a hands-on starter that gets everyone curious about classes and objects.

  2. 2

    Classes and objects

    Guided teaching on classes and objects, worked through together with the teacher.

  3. 3

    Classes and objects — practice lab

    Independent practice, small challenges and one deliberate mistake to diagnose.

  4. 4

    Attributes

    Guided teaching on attributes, building directly on the previous two sessions.

  5. 5

    Attributes — practice lab

    Applied tasks that combine classes and objects and attributes in one piece of work.

  6. 6

    Methods

    Methods introduced and practised, completing the toolkit needed for the project.

  7. 7

    Project build

    Guided build session for the module project: Virtual pet system.

  8. 8

    Test, present and reflect

    Finish, test against the checklist, present the work and explain the decisions behind it.

Project lab

Virtual pet system

Every module ends with something the student built themselves and can demonstrate. This is the piece that goes into their portfolio and gets explained out loud at the end of session 40.

Try this at home

Give your pet a mood that depends on hunger, energy and how long since you last played. Then create three pets and neglect one on purpose.

It is finished when

  • It works from start to finish without breaking
  • You can explain every part of it in your own words
  • You tested it and improved at least one thing afterwards
  • Someone else used or understood it without your help

By the end of this module

Students finishing Module 5 can:

  • Explain and use classes and objects without prompting
  • Explain and use attributes without prompting
  • Explain and use methods without prompting
  • Build and finish virtual pet system
  • Test your own work and correct what you find
  • Talk an adult through what you made and why

Word bank

The vocabulary introduced here, in plain language:

class
A blueprint for creating objects.
object
One instance built from a class.
method
A function that belongs to a class.
Module challenge

Think you have got this?

0 XPLevel 1 · Curious Beginner

6 quick questions drawn from this module — vocabulary, the project you build, and a myth-or-fact round. Every wrong answer explains itself, so a mistake still teaches you something.

🎯 6 questions⚡ Up to 80 XP

Your child's free trial is one message away.

Tell us your child’s class and what they enjoy. We will suggest the closest program fit—no pressure and no upfront payment.