What would be the output of the following code:
numbers = [1, 1, 2, 3]
for number in numbers:
if number % 2 == 0:
continue
print(number)
Python - Chpt 4 - Review
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Beverly Brown
Used 17+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
numbers = [1, 1, 2, 3]
for number in numbers:
if number % 2 == 0:
continue
print(number)
1 1 2
2
1 1
1 1 3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
numbers = [2, 4, 6, 8]
for number in numbers:
print("hello!")
hello!hello!hello!hello!
hello!
2 4 6 8
2hello! 4hello! 6hello! 8hello!
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
for i in range(3):
print(5)
5 5 5
3 3 3 3 3
0 1 2
0 1 2 3 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
for i in range(3):
print(i)
i i i i
0 1 2
i i i
1 2 3
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
drink_choices = ["coffee", "tea", "water", "juice", "soda"] for for drink in drink_choices:
print(drink)
"coffee"
"coffee" "tea" "water" "juice" "soda"
drink
["coffee", "tea", "water", "juice", "soda"]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would be the output of the following code:
numbers = [1, 1, 2, 3]
for number in numbers:
if number % 2 == 0:
break
print(number)
1 1 3
2
1 1
1 1 2 3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the blank with the appropriate while condition in order to print the numbers 1 through 10 in order:
i = 1
____________
print(i)
i += 1
while i <= 10:
while i > 10:
while i < 10:
while i == range(11)
25 questions
Python (I/O to Lists) Formative Quiz
Quiz
•
9th Grade
22 questions
J277 - basic testing and errors
Quiz
•
9th - 12th Grade
20 questions
CodeHS - Intro to Python - Basics and Console Interaction
Quiz
•
9th Grade - Professio...
20 questions
Python year 9
Quiz
•
8th - 11th Grade
20 questions
Unit 5 TEST
Quiz
•
11th - 12th Grade
22 questions
for loop
Quiz
•
9th Grade
20 questions
Python for loop
Quiz
•
12th Grade
26 questions
Program Development - Python: Loops
Quiz
•
9th - 10th Grade
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade
25 questions
Spanish preterite verbs (irregular/changed)
Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)
Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1
Quiz
•
9th - 12th Grade
26 questions
June 19th
Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope
Quiz
•
10th Grade
20 questions
Figurative Language Review
Quiz
•
10th Grade
27 questions
STAAR English 1 Review
Quiz
•
9th Grade