Skip to Main Content
Python for Kids, 2nd Edition
book

Python for Kids, 2nd Edition

by Jason R. Briggs
November 2022
Beginner content levelBeginner
368 pages
6h 47m
English
No Starch Press
Content preview from Python for Kids, 2nd Edition

8How to Use Classes and Objects

Image

Why is a giraffe like a sidewalk? Because a giraffe and a sidewalk are both things, which are known in the English language as nouns and in Python as objects. In programming, objects are a way to organize code and break things down to more easily work with complex ideas. (We used an object in Chapter 4 when we worked with the turtle module’s Turtle object.)

To fully understand how objects work in Python, we need to think about types of objects. Let’s start with giraffes and sidewalks.

A giraffe is a type of mammal, which is a type of animal. A giraffe is also an animate object—it’s alive.

There’s not much to say ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Cookbook, 3rd Edition

Python Cookbook, 3rd Edition

David Beazley, Brian K. Jones
High Performance Python, 2nd Edition

High Performance Python, 2nd Edition

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9781098141400