Please enable JavaScript to use CodeHS

Teaching Intro to Computer Science in Python 3

Lesson 4.13 Nested Control Structures

Description

  • When we use control structures within control structures, we refer to them as nested control structures.
  • When using a for loop within a for loop, we need to be careful to create a second variable to index on.
  • The inner loop will run to completion every time the outer loop runs.

Objective

Students build upon their control structures knowledge to start using nested control structures in their programs.