FOR Loop Python

Quiz
•
Computers
•
6th - 8th Grade
•
Medium
Andrew Kale
Used 1+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for a basic for loop in Python?
for i in range(5):
for (i = 0; i < 5; i++)
foreach i in range(5):
loop i in range(5):
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code print?
1, 2, 3
0, 1, 2
0, 1, 2, 3
3, 2, 1
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
2, 3, 4, 5
2, 3, 4
3, 4, 5
1, 2, 3, 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code do?
Prints each character on a new line
Repeats the whole string
Prints ASCII values
Throws an error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
5, 4, 3, 2
5, 4, 3, 2, 1
1, 2, 3, 4, 5
5, 4, 3, 2, 1, 0
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of break?
Exit loop immediately
Skip iteration
Restart loop
Pause execution
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of continue?
Exit loop immediately
Skip current iteration
Restart loop
Pause temporarily
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
KS4 Programming Techniques (1)

Quiz
•
8th - 10th Grade
15 questions
code.org variables

Quiz
•
3rd - 6th Grade
10 questions
Python Alternating Turns

Quiz
•
7th - 12th Grade
10 questions
Intro to Python

Quiz
•
8th Grade
18 questions
Computer Programming Vocabulary

Quiz
•
5th - 7th Grade
18 questions
AQA GCSE Computer Science - 3.1.4 Sorting Algorithms

Quiz
•
8th - 10th Grade
18 questions
Python basics

Quiz
•
7th - 10th Grade
10 questions
Python Basics - Quiz

Quiz
•
8th - 11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
13 questions
Primary and Secondary Sources

Quiz
•
6th Grade
15 questions
Decimal Operations

Quiz
•
6th Grade
10 questions
Plotting Points on the Coordinate Plane

Quiz
•
7th - 8th Grade