6TIC TAC TOE: USING LOOPS TO CREATE A GAME
Programmers often write code that repeats a set of actions. For instance, they may want to display a password request each time a user enters the wrong password or search for the same phrase in thousands of files. To avoid copying and pasting the same lines of code over and over again, we use the repetition programming control structure or loops, which are code segments that repeat a task a specific number of times or until a certain condition is met. It’s easier to review and correct errors in a loop than multiple lines of repeated code.
USING LOOPS IN APP INVENTOR
In App Inventor, you can control the ...
Get Learn to Program with App Inventor now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.