Teach Your Kids To Code: A Parent-friendly Guide to Python Programming

(vip2019) #1

4


loops are Fun (You Can say that again)


We’ve used loops since our very first program to


draw repeating shapes. Now it’s time to learn how to


build our own loops from scratch. Whenever we need


to do something over and over again in a program,


loops allow us to repeat those steps without having to


type each one separately. Figure 4-1 shows a visual


example—a rosette made up of four circles.

Free download pdf