Verityprep
Question Bank · Unit 4

AP® Computer Science Principles Algorithms and Programming Practice Questions

Work through AP Computer Science Principles practice 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: Variables and Assignments Clear filter

Questions 1–10 of 17
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10

Question 1

Multiple choice Variables and Assignments

Of the following software abstractions, which is considered the highest level of abstraction?

Pick an answer, then check it. The solution opens in a window.

Question 2

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 3

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 4

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 5

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 6

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 7

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 8

Multiple choice Variables and Assignments
Consider a game in which a player flips a fair coin three times. If all three coin flips have the same result (either all heads or…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 9

Multiple choice Variables and Assignments
A biologist wrote a program to simulate the population of a sample of bacteria. The program uses the following procedures. Procedure Call Explanation…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 10

Multiple choice Variables and Assignments
An online game collects data about each player's performance in the game. A program is used to analyze the data to make predictions about how players will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1 of 17
Page 1 of 2