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.

Questions 51–60 of 100
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

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 52

Multiple choice Procedures
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 53

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 54

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 55

Multiple choice Variables and Assignments
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 56

Multiple choice Variables and Assignments
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 57

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 58

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 59

Multiple choice Variables and Assignments
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 60

Multiple choice Procedures
□(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 51 of 100
Page 6 of 10