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 31–40 of 100
  1. 31
  2. 32
  3. 33
  4. 34
  5. 35
  6. 36
  7. 37
  8. 38
  9. 39
  10. 40

Question 31

Multiple choice Conditionals and Loops
The following procedure is intended to return true if at least two of the three parameters are equal in value and is intended to return false otherwise.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 32

Multiple choice Conditionals and Loops
Consider two lists of numbers called list1 and list2. A programmer wants to determine how many different values appear in both lists. For example, if list1…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 33

Multiple choice Variables and Assignments
The code is intended to swap first and second using temp. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 34

Multiple choice Variables and Assignments
Which of the following would be…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 35

Multiple choice Algorithms
A movie theater charges $12 for a regular ticket and $9 for children aged 12 or younger and seniors aged 60 or older. A 3-D movie costs an additional $5. age is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 36

Multiple choice Procedures
What is displayed by this program? start ← 1 end ← 20 current ← 3…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 37

Multiple choice Conditionals and Loops
Which is a benefit of iterative…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 38

Multiple choice Conditionals and Loops
A spinner has Red, Blue and Yellow sectors. Red is four times the size of each of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 39

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 40

Multiple choice Procedures
A user reads reviews of a popular artist's new album and then downloads the album from the Web site of a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 31 of 100
Page 4 of 10