Please enable JavaScript to use CodeHS

Utah Computer Programming 1

Description

In this lesson, students learn to use while loops in their Python programs. While loops allow code to be executed repeatedly based on a condition. They are also reminded of the possibility of creating an infinite loop, which occurs if the exit condition of the while loop is never met, causing the code inside the while loop to repeat continuously.

Objective

Students will be able to:

  • Effectively use while loops in their programs
  • Detect and resolve infinite loops
Description

In this lesson, students will explore how to use for loops in their Python programs. They will be reminded how to use i as a variable in their programs as well as how to control the values of i by altering the starting, ending, and interval values.

Objective

Students will be able to:

  • Implement for loops
  • Use the variable i as a counter
  • Control the values of i in a for loop
Description

In this lesson, students learn about break and continue statements. A break statement is used to immediately terminates a loop. A continue statement is used to skip out of future commands inside a loop and return back to the top of the loop. These statements can be used with for or while loops.

Objective

Students will be able to:

  • Explain the critical difference between break and continue
  • Describe why a break or continue statement would be needed in a coding scenario
Description

In this lesson, students will use control structures within control structures, which are referred to as nested control structures.

Objective

Students will be able to:

  • Identify the different control structures that can be used to modify the flow of control through a program
  • Combine control structures to solve complicated problems
  • Choose the proper control structure for a given problem
Description

In this lesson, students review content with a 15 question Unit Quiz.

Objective

Students will be able to:

  • Prove their knowledge of loops through a multiple choice quiz