Skip to Main Content
Learning Processing, 2nd Edition
book

Learning Processing, 2nd Edition

by Daniel Shiffman
September 2015
Beginner content levelBeginner
564 pages
13h 28m
English
Morgan Kaufmann
Content preview from Learning Processing, 2nd Edition
6

Loops

Repetition is the reality and the seriousness of life.

—Soren Kierkegaard

What’s the key to comedy? Repetition. What’s the key to comedy? Repetition.

—Anonymous

In this chapter:

 The concept of iteration

 Two types of loops: while and for. When do you use them?

 Variable scope: local vs. global

 Iteration in the context of computer graphics

6-1 What is iteration? I mean, what is iteration? Seriously, what is iteration?

Iteration is the generative process of repeating a set of rules or steps over and over again. It’s a fundamental concept in computer programming and you will soon come to discover that it makes your life as a coder quite delightful. Let’s begin.

For the moment, think about legs. Lots and lots of legs on little Zoog. If you had only ...

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

Make: Getting Started with Processing, 2nd Edition

Make: Getting Started with Processing, 2nd Edition

Casey Reas, Ben Fry

Publisher Resources

ISBN: 9780123947925