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 11–20 of 100
  1. 11
  2. 12
  3. 13
  4. 14
  5. 15
  6. 16
  7. 17
  8. 18
  9. 19
  10. 20

Question 11

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

Multiple choice Conditionals and Loops
A flowchart is a way to visually represent an algorithm. The flowchart below is used by an application to set the Boolean variable available to true under…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 13

Multiple choice Variables and Assignments
Consider the following program. Which of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 14

Multiple choice Algorithms
Which of the following best explains why it is not…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 15

Multiple choice Variables and Assignments
Assume that the variables alpha and beta each are initialized with a numeric value. Which of the following code segments can be used to interchange the values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 16

Multiple choice Conditionals and Loops
In the following program, assume that the variable n has been initialized with an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 17

Multiple choice Variables and Assignments
A student's overall course grade in a certain class is based on the student's scores on individual assignments. The course grade is calculated by dropping the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 18

Multiple choice Algorithms
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing toward the top of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 19

Multiple choice Variables and Assignments
A programmer notices the following two procedures in a library. The procedures do similar, but not identical, things. Procedure MaxTwo (x, y) returns the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 20

Multiple choice Variables and Assignments
Consider the following procedure. Procedure Call Explanation DrawLine (x1, y1, x2, y2) Draws a line segment on a coordinate grid with endpoints at coordinates…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 11 of 100
Page 2 of 10