Identify whether the OCR Reference Language code given is an example of selection or iteration.
AP1 Paper 2 Computer Science

Quiz
•
Professional Development
•
12th Grade
•
Medium
RHSC Computing
Used 18+ times
FREE Resource
16 questions
Show all answers
1.
CLASSIFICATION QUESTION
3 mins • 4 pts
Groups:
(a) Selection
,
(b) Iteration
if playerHit() then
score = 0
endif
whilescore != 0
playgame()
endwhile
switch bonus:
case 0:
score = 9
case 1:
score = 7
case 2:
score = 5
endswit
for i = 1 to 10
print(i)
next i
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Write pseudocode to increment a value held in a variable score by one.
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Breaking a complex problem down into smaller problems.
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Hiding or removing irrelevant details from a problem to reduce the complexity.
5.
LABELLING QUESTION
5 mins • 5 pts
A restaurant needs an algorithm designing to help employees work out if a customer can have a half price meal or not. It should:
•input required data
•decide if the customer is entitled to a discount
•output the result of the calculation.
Design the algorithm using a flowchart.
If day NOT "saturday"
Output "Full price"
End
Output "half price"
INPUT discCard
6.
LABELLING QUESTION
3 mins • 3 pts
Each member of staff that works in a restaurant is given a Staff ID. This is calculated using the following algorithm.
Identify the three different variables used.
surname
while
=
str(year)
staffID
year
str
endwhile
input
7.
LABELLING QUESTION
3 mins • 3 pts
Each member of staff that works in a restaurant is given a Staff ID. This is calculated using the following algorithm.
Identify the first three different operators used
str(year)
input
<
while
year
endwhile
surname
str
+
=
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
La sintassi CSS

Quiz
•
9th Grade - Professio...
15 questions
Chapter 13, 14, 15 Servsafe 8th edition

Quiz
•
9th - 12th Grade
20 questions
Immunoculation

Quiz
•
10th Grade - Professi...
18 questions
Vocabulary Learning about Yourself

Quiz
•
12th Grade
21 questions
BG Meetup

Quiz
•
KG - Professional Dev...
13 questions
ทดสอบก่อนเรียนพื้นฐานการเขียนโปรแกรมคอมพิวเตอร์

Quiz
•
9th - 12th Grade
11 questions
SQL_Agreg_GRBY

Quiz
•
1st - 12th Grade
15 questions
JavaScript Basics

Quiz
•
12th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade