Code Order

Classes And Objects

Bundling data and actions into a class: making objects, storing attributes with `__init__` and `self`, writing methods, turning an object into text with `__str__`, and looping over a list of objects. A class body can only hold one method per puzzle here, so some puzzles give an object its starting values after making it; in your own code that usually belongs in `__init__`.

Tap a piece to move it, or drag the ⠿handle. Some pieces don't belong.

0 of 10 solved

1. Meet Rex

Easyone line

Rebuild the line that makes a new `Dog` object named "Rex" and stores it in the variable `pet`.

Your program

0 of 6 slots filled

    Tap or drag pieces here, in the order they should run.

    Pieces

    Some of these belong in no program