Looping-Through-Algorithms--Understanding-Repetition-in-Programming
Looping-Through-Algorithms--Understanding-Repetition-in-Programming
// code to repeat
END FOR
• Example: Counting from 1 to 5
FOR count = 1 TO 5
PRINT count
END FOR
TYPES OF LOOPS: WHILE LOOP
ELSE
END IF
END FOR
USING PSEUDOCODE FOR LOOPS
• Pseudocode is a simple way to plan algorithms
• Example: Finding the largest number in a list
SET largest = first number in list
END IF
END FOR
PRINT largest
COLLABORATIVE SKILLS: PAIR PROGRAMMING