AP Computer Science A Flashcards: Algorithms with Selection and Repetition
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Review key ideas with interactive flashcards. This set includes 10 cards to help you master important concepts.
Which algorithmic building block is used to execute a set of steps multiple times?
Repetition is the building block where a process repeats itself until a desired outcome is reached.
Card 1 of 10
All Flashcards (10)
Which algorithmic building block is used to execute a set of steps multiple times?
Repetition is the building block where a process repeats itself until a desired outcome is reached.
Which two algorithmic building blocks handle decision-making and looping?
Selection handles decision-making based on true/false conditions, while repetition handles looping until an outcome is reached.
What are the three fundamental building blocks of algorithms?
The three fundamental building blocks of algorithms are sequencing, selection, and repetition.
How can you represent algorithmic patterns found in everyday life?
Patterns and algorithms involving selection and repetition from everyday life can be represented using written language or diagrams.
An algorithm for stirring cake batter says to 'mix until smooth'. What building block does this process illustrate?
This illustrates repetition, as the process of mixing repeats itself until the desired outcome (a smooth batter) is reached.
What is selection in an algorithm?
Selection occurs when a choice of how the execution of an algorithm will proceed is based on a true or false decision.
When does a repetition structure in an algorithm stop?
In a repetition structure, a process repeats itself until a desired outcome is reached.
What is the basis for a decision in an algorithm's selection structure?
The choice of how an algorithm will proceed in a selection structure is based on a true or false decision.
Define repetition in the context of algorithms.
Repetition is when a process repeats itself until a desired outcome is reached.
An algorithm for a thermostat turns on the heat only if the temperature is below 70 degrees. What building block does this represent?
This represents selection, as the choice to turn on the heat is based on the true or false decision of whether the temperature is below 70.