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

6Going Loopy

Image

Nothing is worse than needing to do the same thing over and over. There’s a reason we’re told to count sheep when we’re having trouble falling asleep, and it has nothing to do with the amazing sleep-inducing powers of woolly mammals. It’s because endless repetition is boring, and your mind can drift off to sleep easily if you’re not focusing on something interesting.

Programmers don’t like repeating themselves either, unless they’re also trying to fall asleep. Thankfully, most programming languages have a for loop, which repeats things like statements and blocks of code automatically.

In this chapter, we’ll look at for loops, as well ...

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