Classes and objects · exercise 1 of 1 · free preview
The game so far · chapter 13
Right now: A glitch blocks the path, and Pip has nothing to fight with.
This chapter's mission: Lets Pip fight glitches. Work through the exercises, then your own code brings it to life.
A class is a blueprint for objects. __init__ runs when you create one, and self.name = name stores data on that object.
Define a class Robot whose __init__ takes a name and stores it. Create Robot("Pip") and print its name.