Using Loops

Computers are fantastic for doing repetitive tasks and calculations. In this lesson, you'll explore the use of for and while loops and understand their importance in programming.

CC - Lesson P.4 - Using Loops

Objectives:

  • understand the use of loop variables and loop conditions

  • use loops to repeat commands for a set number of times or while a condition is True.

Challenge:

Practice the three challenges at the end of the slides. The third is a choose your own challenge from an outside website.

Practice Using Loops

In the Trinkets below, play with the code to learn how to use for and while loops.