Main content
Course: Intro to computer science - Python?>?Unit 3
Lesson 3: For loopsTrace for loops with range
Problem
Keala is creating a study schedule for her history test at the end of the term. She starts her loop with the
for
statement below.for day in range(num_weeks * 7):
The variable
num_weeks
contains the value 2
when the for
loop executes.How many times does the loop body execute?