Examplary
Start for free
Oak ComputingTest · Computing

Nested loops

The starter and exit quiz of the lesson “Nested loops”, from the unit “Programming: iteration” (Year 10 Computing) by Oak National Academy.

Free to use. Edit it, share it and hand it out to your students.

Oak National Academy

12 questions

  1. What is iteration in programming?
  2. What is a count-controlled iteration?
  3. Which Python statement is used for count-controlled iteration?
  4. What does the range() function do in Python?
  5. Which Python statement is used to repeatedly execute a block of code as long as a condition remains True?
  6. Why is indentation important in Python?
  7. What is a nested loop?
  8. What happens to the inner loop when the outer loop runs again?
  9. Which of these is an example of a nested loop?
  10. What is the purpose of a nested loop?
  11. What happens if the outer loop in a nested loop has a range of 0?
  12. Arrange the output for the following code:for i in range(2): for j in range(3): print(i, j)

License: OGL

Nested loops · Examplary