AP Computer Science A Practice Quiz: Algorithms with Selection and Repetition
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Test your understanding with short quizzes. This quiz has 10 questions to check your progress.
Question 1 of 10
All Questions (10)
A) Input, Processing, Output
B) Sequencing, Selection, Repetition
C) Variables, Constants, Functions
D) Start, Stop, Continue
Correct Answer: B
The content explicitly states, 'The building blocks of algorithms include sequencing, selection, and repetition.'
A) Sequencing
B) Repetition
C) Selection
D) Patterning
Correct Answer: C
The content defines selection as occurring 'when a choice of how the execution of an algorithm will proceed is based on a true or false decision.'
A) Selection
B) Sequencing
C) Repetition
D) Representation
Correct Answer: C
The process of polishing is repeated until a desired outcome (a certain level of shininess) is reached. This is the definition of repetition.
A) Repetition
B) Selection
C) Sequencing
D) Diagramming
Correct Answer: B
The action of wearing a jacket is dependent on a true or false condition (Is it cold?). This choice-based execution is the definition of selection.
A) Selection
B) Repetition
C) Sequencing
D) Decision
Correct Answer: B
The action of stirring is a process that repeats itself until a desired outcome (the mixture thickens) is reached, which is the definition of repetition.
A) Step 1: Wake up.
B) Step 3: If it is raining, pack an umbrella.
C) Step 4: Eat breakfast.
D) Step 5: Keep brushing teeth until two minutes have passed.
Correct Answer: B
Step 3 involves a choice (packing an umbrella) that is based on a true or false decision (is it raining?). This is a clear example of selection.
A) Step 2: Check the weather.
B) Step 3: If it is raining, pack an umbrella.
C) Step 4: Eat breakfast.
D) Step 5: Keep brushing teeth until two minutes have passed.
Correct Answer: D
Step 5 describes a process (brushing teeth) that repeats until a desired outcome is reached (two minutes have passed). This is a clear example of repetition.
A) The overall repetition of the game loop.
B) The sequencing of the game's phases.
C) The selection process within a single turn.
D) The pattern of player order.
Correct Answer: C
The action of getting an extra turn is based on a true/false condition (did the player roll a 6?). This decision-making process within a turn is an example of selection. The overall game is a repetition, but the specific instruction is selection.
A) Choosing which movie to watch based on reviews.
B) Following the ordered steps to assemble a piece of furniture.
C) Dialing a phone number until someone answers the call.
D) Deciding to take the bus or walk based on the distance.
Correct Answer: C
Dialing a number is a process that may be repeated until the desired outcome (someone answers) is reached. Options A and D are examples of selection, and option B is an example of sequencing.
A) Selection
B) Sequencing
C) Repetition
D) Conclusion
Correct Answer: C
This is the direct definition of repetition provided in the content: 'Repetition is when a process repeats itself until a desired outcome is reached.'