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: Conditionals and Loops Clear filter

Questions 21–24 of 24
  1. 21
  2. 22
  3. 23
  4. 24

Question 21

Multiple choice Conditionals and Loops
What is displayed? first ← 10 second ← 20 third ← 30…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 22

Multiple choice Conditionals and Loops
The robot starts facing up. It can enter white or shaded squares but not black squares. Which code reaches the shaded…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 23

Multiple choice Conditionals and Loops
What is the result of running the code? i ← 0 sum ← 0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 24

Multiple choice Conditionals and Loops
A two-floor elevator’s door is already closed. Which condition makes it move exactly when called to the other floor?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 21 of 24
Page 3 of 3