April 2018
Beginner to intermediate
227 pages
4h 53m
English
Python classes are powerful tools that allow us to define new types for creating customized objects. As a prelude to learning how to write classes, we review object-oriented terminology and how to use objects in programs.
To this point, you have quite a bit of experience working with Python objects, but many of these objects—especially strings, lists, and dictionaries—have specialized syntax because they are used so frequently. Turtle objects, as in Example 5.1, allow us to focus on common techniques for writing object-oriented code.
Code using objects is characterized by steps to create objects, call their methods, and occasionally access data attributes.
Object-Oriented Terminology ...
Read now
Unlock full access