  Iteration

Quiz by GCSE Computer Science Teacher 4

GCSE (AQA)
Computer Science
English National Curriculum

Feel free to use or edit a copy

includes Teacher and Student dashboards

### Measures 1 skill fromGCSE (AQA)Computer ScienceEnglish National Curriculum

3.2.2.b

Track each student's skills and progress in your Mastery dashboards

• edit the questions
• save a copy for later
• start a class game
• view complete results in the Gradebook and Mastery Dashboards
• automatically assign follow-up activities based on students’ scores
• assign as homework
• share a link with colleagues
• print as a bubble sheet

### Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!  10 questions
• Q1
What is meant by iteration?
Iteration is a looping a section of code
Iteration is executing the lines in order line by line
Iteration is checking whether a condition is false
Iteration is checking whether a condition is true
45s
3.2.2.b
Edit
Delete
• Q2
What is the difference between a definite iteration and indefinite iteration?
An indefinite iteration will loop a certain amount of times and a definite iteration will loop until a condition is met
A definite iteration will loop a certain amount of times and a indefinite iteration will loop until a condition is met
A definite and indefinite iteration will loop forever
A definite and indefinite iteration will check if a condition is true
60s
3.2.2.b
Edit
Delete
• Q3
What does REPEAT UNTIL mean?
The loop will continue until a condition is met
The section of code will iteration while a condition is true
The section of code will iterate to the maximum number
The section of code will iterate for a certain amount of times
45s
3.2.2.b
Edit
Delete
• Q4
Which is the correct structure for a REPEAT-UNTIL loop?
REPEAT UNTIL
FOR i <-- 1 to 10 END FOR
REPEAT END REPEAT
WHILE END WHILE
45s
3.2.2.b
Edit
Delete
• Q5
What is the purpose of this piece of code? To check if the number is higher or lower than the guess
To loop from 1 to 10
To check if the number is equal to the guess
It will keep repeating forever
45s
3.2.2.b
Edit
Delete
• Q6
Why would you use a WHILE iteration instead of a REPEAT UNTIL?
It uses less amount code
A while loop is significantly faster
It's less processor heavy
A REPEAT UNTIL must happen at least once and this may not always be desirable.
45s
3.2.2.b
Edit
Delete
• Q7
Which program will set off an alarm if the temperature goes below 10 degrees?
REPEAT OUTPUT warningBeep() temp <-- USERINPUT END WHILE
temp <-- USERINPUT WHILE temp < 10 OUTPUT warningBeep() temp <-- USERINPUT END WHILE
temp <-- USERINPUT WHILE TRUE warningBeep() temp <-- USERINPUT END WHILE
temp <-- USERINPUT WHILE temp = 10 OUTPUT warningBeep() temp <-- USERINPUT END WHILE
120s
3.2.2.b
Edit
Delete
• Q8
What is meant by a count-controlled loop?
A count-controlled loop will loop forever
A count-controlled loop will check if a condition is true
A count-controlled loop will be an indefinite loop
A count-controlled loop will iterate a certain amount of times
45s
3.2.2.b
Edit
Delete
• Q9
Which is the correct format for a count-controlled loop?
temp <-- USERINPUT WHILE temp = 10 OUTPUT warningBeep() temp <-- USERINPUT END WHILE
temp <-- USERINPUT WHILE temp < 10 OUTPUT warningBeep() temp <-- USERINPUT END WHILE
REPEAT OUTPUT warningBeep() temp <-- USERINPUT END WHILE
FOR i <-- 1 to 10 END FOR
45s
3.2.2.b
Edit
Delete
• Q10
Which program will ask the user to work out the average test score for 30 pupils. The teacher needs to input each score?
FOR i <-- 1 to 20 mark <-- USERINPUT totalScore = mark + totalScore END FOR average = totalScore / 30
DO mark <-- USERINPUT totalScore = mark + totalScore UNTIL average = totalScore / 30
WHILE MARK < 30 mark <-- USERINPUT totalScore = mark + totalScore average = totalScore / 30
FOR i <-- 1 to 30 mark <-- USERINPUT totalScore = mark + totalScore END FOR average = totalScore / 30
120s
3.2.2.b
Edit
Delete

Teachers give this quiz to your class