Quiz Complete, well Done!
In a for loop, what does the i++ statement typically do?
What is the output of the following 'for' loop?
for i in range(1, 6, 2):
print(i)
What is a for loop used for in programming?
What does the 'range' function do in a 'for' loop?
Which keyword is used to define a for loop?
In a for loop, which part specifies the number of iterations?
What is the output of the following 'for' loop?
for i in range(3):
for j in range(2):
print(i + j)
Which of the following is a valid range for a for loop in Python?
What is the purpose of a for loop?
If a for loop's condition is never true, what happens?
What is the output of the following code?
for i in range(3, 12, 2):
print(i)
Which of the following is an example of a nested 'for' loop?
What is the output of the following code?
for i in range(2, 6):
print(i)
What does the range() function in Python do?
What is the purpose of a 'for' loop?