Lesson Summary


Students continue learning about iteration by using while loops and nested iteration. Students work through a guided tutorial on while loops and learn more turtle graphics features.  They also have the opportunity to practice collaboratively writing programs using for loops, while loops, and turtle graphics.  Throughout the lesson, students are given the opportunity to use their journal as a reflective tool.


  • Students will know that iteration can be performed in Python using while loops.  
  • Students will understand that for and while loops can be written (nested) inside of other for and while loops.


  1. Getting Started (5 min)
  2. Guided Activity (15 min) - for and while loops with turtle graphics
  3. Collaborative Activity (25 min) - shared coding of an iterative program
  4. Wrap Up (5 min) - journal

Learning Objectives

CSP Objectives

Big Idea - Programming
  • EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
    • LO 5.1.1 - Develop a program for creative expression, to satisfy personal curiosity, or to create new knowledge. [P2]
  • EU 5.2 - People write programs to execute algorithms.
    • LO 5.2.1 - Explain how programs implement algorithms. [P3]
  • EU 5.4 - Programs are developed, maintained, and used by people for different purposes.
    • LO 5.4.1 - Evaluate the correctness of a program. [P4]
  • EU 5.5 - Programming uses mathematical and logical concepts.
    • LO 5.5.1 - Employ appropriate mathematical and logical concepts in programming. [P1]

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP5: Use appropriate tools strategically.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.9 - Synthesize information from a range of sources
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

  • Students will know that iteration can be performed in Python using while loops.  
  • Students will understand that for and while loops can be written (nested) inside of other for and while loops.

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are programs used for creative expression, to satisfy personal curiosity or to create new knowledge?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • Guided activity: "Turtle Graphics Guided Activity: The while looop" in the Lesson Resources folder


Lesson Plan

Warm Up (5 min)

What will be displayed at the end of this program?

for x in range (0, 8):
   y += 1 print (y)

Introduction of Content (15 min)

  • Use the guided activity ("Turtle Graphics Guided Activity: The while looop" in the lesson folder) to discuss while loops and nested iteration.
  • To save time, have these programs open in your IDE before class starts.

Collaborative Coding Activity (25 min)

Have students work together to complete a coding activity that uses while loops, for loops, and/or nested iteration. Ideally, the students should design this program from scratch. They should think about a problem to be solved and select the appropriate iteration structure.

Wrap Up (5 min)

Journal: In your journal, summarize the process that you used with your classmates to create the collaborative project. What problems did you encounter? What concepts do you need clarified?


Options for Differentiated Instruction

  • Give students a copy of the guided activity instructions so they can follow along.
  • Possibly give students a code stem to work from for the collaborative project (while ensuring that they have the opportunity to problem-solve by thinking about and implementing an appropriate loop structure).

Evidence of Learning

Formative Assessment

Various checking-for-understanding techniques:

  • Temperature checks
  • Teacher reviews of student's code
  • Thumbs up/ thumbs down
  • Questioning throughout the lesson (whole group / small group / individual)

Quick quizzes

Peer review

Interactive journaling

Summative Assessment

Students will work collaboratively to develop a program that uses nested iteration and turtle graphics.