WorksheetsPseudocode - Iteration
Total questions: 10
Worksheet time: 6mins
Which type of iteration should be used when you know how many times you want to loop?
Count Controlled
Condition Controlled
Which type of iteration should you use if you don't know how many times you need to loop?
Condition Controlled
Count Controlled
What is missing?
____ i = 1 To 10
OUTPUT: "String"
ENDFOR
FOR
FOUR
WHILE
Fill in the missing blank:
_______ variable <> "Hi"
OUTPUT: "Hi to you!"
ENDWHILE
WHILST
WHILE
FOR
IF
Pick the correct answer to match the following:
A loop that will check the condition before the code inside is executed.
FOR
WHILE
REPEAT...UNTIL
Pick the correct answer to match the following:
A loop that will check the condition after the code inside is executed.
WHILE
REPEAT...UNTIL
FOR
Which of the following will run 10 times? (Choose all that apply.)
FOR i = 1 TO 10
OUTPUT: "Number " + i
ENDFOR
FOR i = 0 To 10
OUTPUT: "Number: " + i
ENDFOR
input = 10
count = 1
WHILE count <= input
OUTPUT: count
count = count + 1
ENDWHILE
Complete the blank:
" (a) is the process of repeating an action multiple times."
Which of these is the correct syntax? (Choose all that apply.)
FOR i = 1 TO 10
WHILE i != 10
FOR i = 1 <- 10
WHILE i <> 10
How many times will the following loop run?
myString = "A word"
FOR i = 1 TO LENGTH(myString)
'Do something
ENDFOR
6
5
10
