← Back to the Introduction to Computer Science outline The Course Maker
← Introduction to Computer Science outline
Week 15 · Readings & resources

Week 15 — Readings & Resources

Introduction to Computer Science Free sample edition

Your primary reading is Chapter 15 (in this module). Everything below is the optional, go-deeper layer — pick what helps, skip the rest.

How to use this page

This page has 12 items (6 readings and 6 videos). Allow 80–98 minutes for everything. Each group points back to the matching chapter section and class-session segment, so use the full menu when you want more, or take the quick path below.

Every video here has captions: turn them on with the CC button in the player. The chapter covers the same ideas in text.

Pick-one quick path (16–20 min total)

① Building objects from a class

Chapter 15, Section “Bundle data with its methods: classes and objects” · Session 1, Segment 1, “Classes, objects, and the setup method” · Remember: a class is the plan and each object built from it is a separate thing with its own data.

  • 9.3, A First Look at Classes — The Python Tutorial — the official tutorial's section on class definitions, class objects, instance objects, and method objects; read 9.3.1 through 9.3.4, where calling the class runs the setup method and a method call passes the object in first, and skip 9.3.5 on class variables, which is a later course's topic. This builds on Week 7's work with functions, since every method is a function inside a class. (reading, 10–15 min)
  • Classes and instances — MDN Web Docs — a short, mostly language-neutral explanation of a class as a template and an instance as a concrete object built by a constructor; read only the Classes and instances section and stop before Inheritance. (reading, 3–5 min)
  • How to Create a Class in Python — 2MinutesPy — a two-minute walk from an empty class to one with a setup method and a method of its own; use it as a quick warm-up while working through the Week-15 module overview. (video, 2 min) (captions: creator)
  • Python Classes and Objects, OOP for Beginners — Python Simplified — an eight-minute illustrated tour of objects, attributes, methods, local variables, the init method, and the self parameter; pause at the local-variables chapter and connect it to this week's missing-self bug, noting that its forgotten self. ends in NameError because the other method reads the bare name, while the chapter's bug reads self.name and ends in AttributeError. The video calls self a keyword; it is only a naming convention, as the chapter's caveat says. (video, 8 min) (captions: automatic)

② Attributes, self, and methods

Chapter 15, Section “Pass self: methods take the object first” · Session 1, Segment 2, “Attributes, self, and methods” · Remember: the object before the dot is passed in as self, so the call never writes it.

  • Classes and Objects — learnpython.org — a one-page interactive lesson on classes as templates, the variables and functions an object carries, and the init method, ending with an in-browser exercise that builds two separate objects; predict each attribute value before you run the exercise. (reading, 6–10 min)
  • Function and Method Arguments — PEP 8 — the short section of Python's style guide that says what the first parameter of an instance method is called; read it, then reread the chapter's caveat that the name is a convention, not a keyword. (reading, 2–3 min)
  • Why self is used in Python classes? — 2MinutesPy — a two-minute explainer of what self means and why every method lists it first, with a short code example at the end; as you watch, name which object self stands for in each call. (video, 2 min) (captions: creator)
  • Python OOP Tutorial 1, Classes and Instances — Corey Schafer — a calm fifteen-minute screencast that builds a class, gives each instance its own attributes in the setup method, and adds a method; follow the first video only, since the rest of the series covers topics for a later course. (video, 15 min) (captions: creator)

③ Separate state, and the missing-self bug

Chapter 15, Section “Find the missing-self bug” · Session 2, Segment 3, “Each instance's state and the missing-self bug” · Remember: a value an object should remember goes on self, and each object keeps its own copy.

  • Classes — Exercism Python track — a free concept page on classes, instances, the setup method, and methods; read the sections on classes, customizing instantiation, and methods, and skip Class Attributes and the class-method material, which this course leaves for a second course. (reading, 8–12 min)
  • Python Object Oriented Programming in 10 minutes — Bro Code — a ten-minute demo that builds two car objects from one class, each with its own make, model, year, and color, and calls a method on each; after it, explain why driving one car never changes the other. (video, 10 min) (captions: automatic)
  • Classes and Objects with Python, Part 1 — CS Dojo — a beginner lesson that starts object-oriented programming in Python step by step; type along in your browser runner and check every attribute that should be on self actually has self. in front of it. (video, 12 min) (captions: automatic)

Optional one-stop reference (free online reference)

  • Glossary, attribute — Python Software Foundation — the official documentation's glossary, the course's free reference for every language fact; read the entries for attribute, method, and object, and skip the rest of the list. (reading, 2–4 min)

Heads-up (links rot): these point to outside sites that occasionally move or rename pages. If a link ever fails, tell your instructor and use the reference above in the meantime.

Provenance: Built with The Course Maker · samples.thecoursemaker.com