AP Computer Science Principles Quiz
16 questions · no time limit
0:00
ALGORITHMS AND PROGRAMMING
Question 1 of 16
No time limit
Current
Answered
Flagged
Not seen
Based on the scenario, a classroom tool merges two lists of student IDs. Input: list
a and list b, each containing integers (IDs may repeat across lists). Output: a new list containing all IDs from a followed by all IDs from b. Constraints: do not change a or b; preserve order within each list; AP-style pseudocode.
A student writes:
PROCEDURE MergeLists(a, b)
merged <- a
FOR EACH id IN b
APPEND(a, id)
RETURN merged
Which step is necessary to ensure the procedure works correctly? YOUR PROGRESS
16
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end