Python While Loops
Quiz
•
Computers
•
12th Grade
•
Hard
Thomas Martinez
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For the code shown, what will happen?
It will print all the numbers from 0 to 11
It will print all the numbers from 0 to 11 in increments of 3
Infinite loop
It will not run (Syntax error)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A while loop is used when
You know how many times you are going to loop
You want to loop for an unknown number of times, and possibly forever
You only want to run the code in the loop once
You see the word while in the problem description
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is iteration important?
It determines the order in which instructions are carried out
It allows code to be simplified by removing duplicated steps into a block that can be executed many times
It allows multiple paths through a program
It ensures the code works correctly
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The condition for a while loop to continue could include which of the following?
While something equals something
While something is True
While something is greater than something
All of these
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the final value of the variable 'number'?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To increment means to
increase the value of a variable
decrease the value of a variable
add 1 to the variable
subtract 1 from the variable
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
A counter is (check ALL that apply)
A variable used in a loop to count the number of times something happened
usually initialised to zero
usually incremented inside the loop
a person with a pen and paper
used only outside of the loop
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
History of Digital Computer
Quiz
•
10th - 12th Grade
12 questions
WEB AUTHORING: QUIZ 4
Quiz
•
9th - 12th Grade
10 questions
My Sql
Quiz
•
12th Grade
10 questions
G10 CS Linear Search
Quiz
•
12th Grade
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
20 questions
Komputer
Quiz
•
1st - 12th Grade
14 questions
TCP/IP & other protocols [A Level]
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
