Font size
WorksheetsCodeHS 1.9 & 1.10 Loops
Total questions: 9
Worksheet time: 7mins
for(int i = 0; i < 100; i++)
iterative
programming that repeats
sequential
programming that doesn't repeat
int i = 0
runs at the start of the first loop
i < 100
runs at the start of each loop
i++
runs at the end of each loop
How many balls does Karel put down?
(a)
How many balls does Karel put down?
(a)
Sweet Caroline
bum bum bum
Good times never seemed so good
I've been inclined
This is a trick question
What is the best code to replace condition in this code to make Karel move to the wall in front of her?
facingNorth()
frontIsClear()
noWallsPresent()
facingWall()
true
What does this code do?
Puts down a row of balls
Puts down a column of balls
Puts down balls in a line up to the wall
Removes all of the balls along a path to the wall
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
What fruit is a good source of potassium and grows on a flowering herb?
(a)
