
For Loop Quiz
Authored by Michael Alves
Computers
11th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the for loop allow us to do?
Execute code an indefinite number of times
Execute code based on user input
Execute code a predetermined number of times
Execute code only once
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the starting value of the variable 'i' in a for this loop:
for i in range(5):
1
-1
0
2
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the range function determine in a for loop?
The number of times the loop runs
The conditions for the loop to end
The number of variables used in the loop
The type of data used in the loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: for i in range(4): print(i+1)?
1 2 3 4
0 1 2 3
2 3 4 5
4 3 2 1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of 'i' when the loop ends in the code: for i in range(6)?
5
6
4
7
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: for i in range(3): print('hello')?
hello
hello hello hello
hello hello hello hello
hello hello
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: for i in range(3): print(i)?
0 1 2 3
1 2 3 4
1 2 3
0 1 2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Python with DataScience
Quiz
•
7th Grade - University
10 questions
Podstawy Pythona
Quiz
•
9th - 12th Grade
12 questions
Software
Quiz
•
10th - 12th Grade
10 questions
IT Quiz
Quiz
•
11th - 12th Grade
13 questions
ICT and Retail Industry
Quiz
•
8th - 12th Grade
10 questions
Fun with Paint and Storage
Quiz
•
1st Grade - University
9 questions
1.5.1 - Starter Task/Social Engineering Starter (Dg)
Quiz
•
11th Grade
10 questions
Computer Aided Design
Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade