Skip to Main Content
Math Adventures with Python
book

Math Adventures with Python

by Peter Farrell
January 2019
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 4m
English
No Starch Press
Content preview from Math Adventures with Python

9BUILDING OBJECTS WITH CLASSES

Old teachers never die, they just lose their class.—Anonymous

image

Now that you’ve created cool graphics using functions and other code in Processing, you can supercharge your creativity using classes. A class is a structure that lets you create new types of objects. The object types (usually just called objects) can have properties, which are variables, and methods, which are functions. There are times you want to draw multiple objects using Python, but drawing lots of them would be way too much work. Classes make drawing several objects with the same properties easy, but they require a specific syntax you’ll need to ...

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

The Statistics and Calculus with Python Workshop

The Statistics and Calculus with Python Workshop

Peter Farrell, Alvaro Fuentes, Ajinkya Sudhir Kolhe, Quan Nguyen, Alexander Joseph Sarver, Marios Tsatsos, Amit Chaurasia, Rohan Chikorde, Sanjin Dedic, Tim Hoolihan, Ravi Ranjan Prasad Karn, Alberto Manzini
Math for Deep Learning

Math for Deep Learning

Ronald T. Kneusel

Publisher Resources

ISBN: 9781492071228