For and While Loops in Python

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Lauren Tan
Used 144+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The program above
prints all the odd numbers between 1 and 20
prints all even numbers between 1 and 20
print all the odd numbers between 1 and 21
prints all the even numbers between 1 and 21
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The equivalent of the above for loop using the while syntax would be
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The above program prints
Numbers 1 to 10 in reverse order
Numbers 1 to 11 in reverse order
Numbers 1 to 10
Numbers 1 to 11
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Look at the following code, what will it generate
1,2,3,4,5,6,7,8,9,10,11,12
0,1,2,3,4,5,6,7,8,9,10,11,12
1,2,3,4,5,6,7,8,9,10,11,12,13
0,1,2,3,4,5,6,7,8,9,10,11,12,13
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
1,2,3,4
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What best describes what is printed by the following code?
Prints the numbers 0 through 6
Prints
h
e
l
l
o
w
Prints the phrase "hello world!" 7 times
Prints "hello w" 7 times
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What best describes what is printed by the following code?
Prints the numbers 0 through 6
Prints
h
e
l
l
o
w
Prints the phrase "hello world!" 7 times
Prints "hello w" 7 times
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Python Programming - Iteration

Quiz
•
9th Grade
14 questions
Python Basics - Year 8

Quiz
•
7th - 9th Grade
18 questions
FOR and WHILE loop in Python

Quiz
•
9th - 12th Grade
18 questions
Foundations of Programming

Quiz
•
9th - 10th Grade
14 questions
For Loops (Java)

Quiz
•
9th - 12th Grade
17 questions
Python - Quiz

Quiz
•
9th - 11th Grade
20 questions
Python while loops

Quiz
•
12th Grade
13 questions
Python Iteration

Quiz
•
10th 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
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade