Python For Loop Quiz

Quiz
•
Computers
•
11th Grade
•
Medium

Michael Alves
Used 8+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the starting value of the variable 'I' in the for loop if we use the range function with two parameters?
for i in range(3, 10):
0
1
2
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the second parameter in the range function indicate?
Ending value for 'I'
None of the above
Increment for 'I'
Starting value for 'I'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this example where the loop goes from 1 to 9 in two step increments, what is the ending value for 'I'?
for i in range(1, 9, 2):
11
10
8
9
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In this example, what is the ending value for 'I'?
for i in range(10, 0, -1):
-1
1
10
0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a for loop where the loop counts up to 100 by twos, what is the ending value for 'I'?
for i in range(0, 100, 2):
98
100
97
99
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to specify an increment in the range function?
None of the above
Both A and B
Two parameter version
Three parameter version
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What can the number in the range function be if it's a variable?
An expression that evaluates to an integer
Only an integer
Only a string
Only a float
Similar Resources on Wayground
9 questions
Nested Loops and Multi-dimensional Arrays

Quiz
•
11th Grade
10 questions
CS Python Fundamentals Quiz 6 Review

Quiz
•
9th - 12th Grade
6 questions
Assessment - for loop in Python

Quiz
•
11th - 12th Grade
10 questions
Untitled Quiz

Quiz
•
6th Grade - University
10 questions
7.9 Identifying and Correcting Errors Cambridge IGCSE 0478

Quiz
•
10th Grade - University
11 questions
49. Programming 1 : Basic Programming Constructs

Quiz
•
9th - 12th Grade
10 questions
Recursion Contest

Quiz
•
10th - 12th Grade
10 questions
Python Alternating Turns

Quiz
•
7th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade