Verityprep
Question Bank · Unit 4

AP® Computer Science Principles Algorithms and Programming Multiple Choice Questions

Work through AP Computer Science Principles multiple-choice questions on Algorithms and Programming, 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.

Subtopic: Algorithms Clear filter

Questions 11–20 of 49
  1. 11
  2. 12
  3. 13
  4. 14
  5. 15
  6. 16
  7. 17
  8. 18
  9. 19
  10. 20

Question 11

Multiple choice Algorithms
Which best compares the values displayed by programs A and B? Program A: i ← 1 REPEAT…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 12

Multiple choice Algorithms
A researcher predicts community births using ten years of population and birth data. The model…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 13

Multiple choice Algorithms
Byte-pair encoding replaces repeated adjacent character pairs with otherwise unused characters and saves the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 14

Multiple choice Algorithms
Each logic gate takes two inputs. For…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 15

Multiple choice Algorithms
Every tenth snack-bar purchase is free. GetCount(customerID) returns the customer’s number of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 16

Multiple choice Algorithms
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 17

Multiple choice Algorithms
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 18

Multiple choice Algorithms
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 19

Multiple choice Algorithms
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 20

Multiple choice Algorithms
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 11 of 49
Page 2 of 5