Selection, Iteration, and String Algorithms
Free AP Computer Science A multiple-choice practice for topics 2.9–2.10, Unit 2 (Selection and Iteration). Answer five random questions, check your work, and review the essential knowledge behind each one.
Unit 2: Selection and Iteration. Topics 2.9–2.10. This set has 58 questions. Each time the page loads you get five of them, chosen at random. Pick an answer, press Check answer, and read the explanation for every choice. Reload the page or use New questions for a fresh five.
Topics assessed
- 2.9 Implementing Selection and Iteration Algorithms
- 2.10 Implementing String Algorithms
Practice questions
Loading questions…
Essential knowledge for this set
These are the essential knowledge (EKS) statements from the AP Computer Science A Course and Exam Description that the 58 questions in this set assess, grouped by topic and learning objective. The table under each question links here.
Topic 2.9: Implementing Selection and Iteration Algorithms
2.9.A — Develop code for standard and original algorithms (without data structures) and determine the result of these algorithms.
-
2.9.A.1 There are standard algorithms to:
- identify if an integer is or is not evenly divisible by another integer
- identify the individual digits in an integer
- determine the frequency with which a specific criterion is met
- determine a minimum or maximum value
- compute a sum or average
Topic 2.10: Implementing String Algorithms
2.10.A — Develop code for standard and original algorithms that involve strings and determine the result of these algorithms.
-
2.10.A.1 There are standard string algorithms to:
- find if one or more substrings have a particular property
- determine the number of substrings that meet specific criteria
- create a new string with the characters reversed