O'Reilly logo

Learn to Program with Small Basic by Ed Price, Majed Marji

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13REPEATING FOR LOOPS

image

Have you ever noticed that no matter how many times you take out the trash, clean dirty dishes, and do laundry, you always have to do it again? What if you only had to do each task once, and then you created a robot version of yourself to do it every time after that? That would be amazing!

In the Small Basic universe, automating repetitive tasks is a breeze. You only have to write code for a repetitive task once, and then you can use a loop to repeat that task as many times as you need.

Small Basic uses two types of loop statements: For loops and While loops. In this chapter, you’ll learn about For loops, explore nested ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required