Font size
WorksheetsCodeHS 2.10 While Loops
Total questions: 11
Worksheet time: 6mins
A way to repeat code in your program.
loop
condition
selection
counter
fencepost
What lets us repeat code as long as something is true?
while loop
iteration
edge case
counter
bagels
What is code that you put inside an if statement or while loop?
condition
iteration
immersion
fencepost
counter
What lets us change the flow of the code? (choose three)
control structure
if statement
while loop
sequence
counter
What is a problem in your code that only occurs in extreme situations?
edge case
iteration
counter
while loop
condition
What is the fencepost problem better known as?
off-by-one error
farmer's dilemma
Duff's device
iterative design
counter
What was the last thing Mr. Pavao posted on the #comp-sci-general channel in the Discord server?
a bitmoji
an emoji
a gif
the answers to this quiz
a dad joke
How would you describe a while loop?
Check the condition; if it is true, then run a code block. Otherwise, run a different code block.
Check whether the condition is true; if it is true, then keep repeating until the condition is false.
Run a block of code and then check the condition; if the condition is true, then repeat the block of code.
What kind of program structure is a while loop?
infinite look
iterative
sequential
selection
Why would we use a while loop instead of a for loop?
we don't know how many times we want to run the loop
we know how many times we want to run the loop
It's a structure that is more efficient to code and execute
it's best practicies
Which of these are learning targets in today's lesson?
I can explain the purpose of a while loop
I can create while loops to repeat code while a condition is true
I can use while loops to solve new types of problems
I can avoid writing infinite loops
I can use conditionals to create while loops
