Use nested selection and nested iteration structures.
Track each student's skills and progress in your Mastery dashboards
Q 1/10
Score 0
What is meant by nested selection?
60
One selection below another selection statement, which increases the conditions
One iteration below another iteration, another which increases the conditions
One iteration within another iteration, which increases the conditions
One selection within another selection statement, which increases the conditions
Q 2/10
Score 0
What is meant by nested iteration?
60
One iteration below another iteration, which increases the conditions
One iteration within another iteration, which increases the conditions
One selection below another selection statement, which increases the conditions
One selection within another selection statement, which increases the conditions
Q 3/10
Score 0
What is this program is doing?
60
Looping through 10 times to check there are 8 characters
Checking if the password is equal to the username
Checking if the password is equal to the username and if it's over 8 characters
Checking if it's 8 characters
Q 4/10
Score 0
Which is the correct code for a nested loop to show all the times table?
60
FOR i <-- 1 TO 10
FOR I <-- 1 to 10
OUTPUT j * i
ENDFOR
ENDFOR
DO i <-- 1 TO 10
DO j <-- 1 to 10
OUTPUT j * i
ENDDO
END
WHILE I <-- 1 TO 10
WHILE j <-- 1 to 10
OUTPUT j * i
ENDWHILE
ENDWHILE
FOR i <-- 1 TO 10
FOR j <-- 1 to 10
OUTPUT j * i
ENDFOR
ENDFOR
Q 5/10
Score 0
Why do we need separate variables for i and j?
FOR i <-- 1 TO 10
FOR j <-- 1 to 10
OUTPUT j * i
ENDFOR
ENDFOR
30
A DO-UNTIL loop should have been used
A while loop should have been used
The i and j would always be the same value as it would be replaced each time
It could have been i and j because it would show all of the times table
Q 6/10
Score 0
What code will add two values together for every number from 1 to 10?
120
WHILE i <-- 1 TO 10
WHILE i <-- 1 to 10
OUTPUT i + i
ENDWHILE
ENDWHILE
FOR i <-- 1 TO 10
FOR j <-- 1 to 10
OUTPUT j + i
ENDFOR
ENDFOR
DO UNTIL i <-- 1 TO 10
DO UNTIL i <-- 1 to 10
OUTPUT i + i
FOR i <-- 1 TO 10
FOR i <-- 1 to 10
OUTPUT i + i
ENDFOR
ENDFOR
Q 7/10
Score 0
What code has created a nested iteration to check whether the user still wants to play the game, and whether they have inputted their name with at least one character?
120
WHILE gamePlay = "Y"
END WHILE
WHILE gamePlay = "Y"
DO
username <-- USERINPUT
UNTIL
username != ""
END WHILE
DO
username <-- USERINPUT
UNTIL
username != ""
FOR gamePlay = "Y"
DO
username <-- USERINPUT
UNTIL
username != ""
END FOR
Q 8/10
Score 0
Which program will check if someone is less than 18 and if they're, check whether they're a child or teenager?
120
age = USERINPUT
WHILE age > 18
OUTPUT "Now checking if you're a child or teenager"
IF age < 13
OUTPUT("You're a child")
ELSE
OUTPUT("You're a teenager")
ENDWHILE
age = USERINPUT
WHILE age > 18
OUTPUT "Now checking if you're a child or teenager"
WHILE age < 13
OUTPUT("You're a child")
ELSE
OUTPUT("You're a teenager")
ENDWHILE
age = USERINPUT
IF age > 18
OUTPUT "Now checking if you're a child or teenager"
IF age < 13
OUTPUT("You're a child")
ELSE
OUTPUT("You're a teenager")
ENDIF
age = USERINPUT
IF age < 18
OUTPUT "Now checking if you're a child or teenager"
IF age < 13
OUTPUT("You're a child")
ELSE
OUTPUT("You're a teenager")
ENDIF
Q 9/10
Score 0
Why do you need to be careful using nested selection or iteration?
60
They are not efficient when combined
They are only used in some langauges
It can be become confusing with multiple conditions
They are difficult to program
Q 10/10
Score 0
How many times in total will hello be output?
60
4
8
16
2
10 questions
Q.What is meant by nested selection?
1
60 sec
3.2.2.c
Q.What is meant by nested iteration?
2
60 sec
3.2.2.c
Q.What is this program is doing?
3
60 sec
3.2.2.c
Q.Which is the correct code for a nested loop to show all the times table?
4
60 sec
3.2.2.c
Q.Why do we need separate variables for i and j?
FOR i <-- 1 TO 10
FOR j <-- 1 to 10
OUTPUT j * i
ENDFOR
ENDFOR
5
30 sec
3.2.2.c
Q.What code will add two values together for every number from 1 to 10?
6
120 sec
3.2.2.c
Q.What code has created a nested iteration to check whether the user still wants to play the game, and whether they have inputted their name with at least one character?
7
120 sec
3.2.2.c
Q.Which program will check if someone is less than 18 and if they're, check whether they're a child or teenager?
8
120 sec
3.2.2.c
Q.Why do you need to be careful using nested selection or iteration?