Q4

Week 4 Quiz

Loops and Iteration

Student Information

Question 1: Multiple Choice (2 points)

Which loop is best for iterating over a sequence like a list or string?

Question 2: Short Answer (3 points)

Write a for loop that prints the numbers 1 through 5:

Question 3: Multiple Choice (2 points)

What does the range(3, 8) function generate?

Question 4: True/False (2 points)

A while loop will continue executing as long as its condition is True.

Question 5: Multiple Choice (1 point)

Which keyword is used to exit a loop early?

← Back to Week 4 Lesson 📚 Semester Overview Next: Week 5 Lesson →