Skip to content
Middle School Python
NY-CSDF.6-8.CT.7

Traverse data with explicit loop state

Solve CodingBat-style medium warmups with string/list traversal, for loops, while loops, accumulators, and nested conditionals.

Learn the skill

  1. 1Solve CodingBat-style medium warmups with string/list traversal, for loops, while loops, accumulators, and nested conditionals.
  2. 2Stop infinite loops by changing loop state intentionally and test empty or boundary inputs.

Cited instruction

Use the publisher's material for instruction, then return to PeerTutor for the checked practice written for this skill.

Computer Science and Digital Fluency · New York State Education Department

Practice preview

How many times does this loop run? for i in range(5): print(i)

What is the final value printed? for i in range(2, 6): print(i)

What list does list(range(1, 8, 2)) return?

Open adaptive practice

Course mapping reviewed by Nikhil on 2026-08-26. Practice is authored for PeerTutor and does not reproduce linked providers' exercises.

Traverse data with explicit loop state practice · PeerTutor