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 141–150 of 214
  1. 141
  2. 142
  3. 143
  4. 144
  5. 145
  6. 146
  7. 147
  8. 148
  9. 149
  10. 150

Question 141

Multiple choice Unit 4: Algorithms and Programming
Course points are the midterm plus final score, except that a higher final score replaces the midterm score. Thus Khalil keeps both original scores, while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 142

Multiple choice Unit 4: Algorithms and Programming
An online retailer uses an algorithm to sort n items. Based on the table, which best…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 143

Multiple choice Unit 4: Algorithms and Programming
A NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 144

Multiple choice Unit 4: Algorithms and Programming
A student wants to create an algorithm that can determine, given any program and program input, whether or not the program will go into an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 145

Multiple choice Unit 4: Algorithms and Programming
An experiment has 75% expected successful trials and 25% unsuccessful trials. Which condition completes the simulation? successful ← 0 unsuccessful ← 0 REPEAT…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 146

Multiple choice Unit 4: Algorithms and Programming
The code should display every multiple of 5 from start through end, inclusive. start and end are…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 147

Multiple choice Unit 4: Algorithms and Programming
Contains returns true when target occurs in list and false otherwise. Which statements are true? I. It implements binary search. II. It implements linear…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 148

Multiple choice Unit 4: Algorithms and Programming
A word-game algorithm returns the first letter of every palindrome word, in alphabetical order. For ["banana","kayak","mom","apple","level"], it returns…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 149

Multiple choice Unit 4: Algorithms and Programming
□(n) returns n^2 and Cube(n) returns…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 150

Multiple choice Unit 4: Algorithms and Programming
KeepPlaying is intended to ask whether a user wants to keep playing. Which describes its actual result? PROCEDURE KeepPlaying(){…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 141 of 214
Page 15 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.