6 Questions
Which variable is incremented by 1 in each iteration of the loop?
number
Which variable is used to control the loop?
number
What is the value of 'number' when the loop ends?
3
Which variable is incremented by 1 in each iteration of the loop?
number
What is the value of 'counter' when the loop ends?
3
What is the final value of 'number' when the loop ends?
1
This quiz tests your understanding of a simple Python code that uses a counter and a loop. See if you can predict the values of the variables as the code executes.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free