Verityprep
Question Bank

AP® Computer Science Principles Practice Questions

Work through AP Computer Science Principles practice questions unit by unit, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 91–100 of 214
  1. 91
  2. 92
  3. 93
  4. 94
  5. 95
  6. 96
  7. 97
  8. 98
  9. 99
  10. 100

Question 91

Multiple choice Unit 4: Algorithms and Programming

Of the following software abstractions, which is considered the highest level of abstraction?

Pick an answer, then check it. The solution opens in a window.

Question 92

Multiple choice Unit 4: Algorithms and Programming
An algorithm is intended to display the following output. red red blue red red blue red red blue…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 93

Multiple choice Unit 4: Algorithms and Programming

The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing right.

Figure

The following programs are each intended to move the robot to the gray square. Program II uses the procedure GoalReached, which returns true if the robot is in the gray square and returns false otherwise.

Figure

Which of the following statements best describes the correctness of the programs?

Pick an answer, then check it. The solution opens in a window.

Question 94

Multiple choice Unit 4: Algorithms and Programming
Which of the following actions are generally helpful in program development? I. Consulting potential users of the program to identify their concerns…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 95

Multiple choice Unit 4: Algorithms and Programming
Ticket prices for a science museum are shown in the following table. Type of Ticket General Admission Cost (in dollars) Guided Tour Cost (in dollars) Regular…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 96

Multiple choice Unit 4: Algorithms and Programming
The following algorithm is intended to take a positive integer as input and display its individual digits in order from right to left. For example, if the input…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 97

Multiple choice Unit 4: Algorithms and Programming

Consider the two programs below.

Figure

Which of the following best compares the values displayed by programs A and B?

Pick an answer, then check it. The solution opens in a window.

Question 98

Multiple choice Unit 4: Algorithms and Programming
A student wrote the following program to remove all occurrences of the strings "the" and "a" from the list wordList. Line 1: index ← LENGTH (wordList) Line 2:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 99

Multiple choice Unit 4: Algorithms and Programming

The grid below contains a robot represented as a triangle, initially facing right. The robot can move into a white or gray square but cannot move into a black region.

Figure

The code segment below uses the procedure GoalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise.

REPEAT UNTIL (GoalReached ())
{
    <MISSING CODE>
}

Which of the following replacements for <MISSING CODE> can be used to move the robot to the gray square?

Pick an answer, then check it. The solution opens in a window.

Question 100

Multiple choice Unit 4: Algorithms and Programming
Consider the following spinner, which is used to determine how pieces are to be moved on a game board. The region labeled Move 1 space is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 91 of 214
Page 10 of 22

AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.