Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Practice Questions

Work through AP Computer Science A practice questions on Selection and Iteration, 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 501–510 of 740
  1. 501
  2. 502
  3. 503
  4. 504
  5. 505
  6. 506
  7. 507
  8. 508
  9. 509
  10. 510

Question 501

Multiple choice Boolean Expressions
What is printed? int samples = 17; int seconds = 5; double rate = samples / seconds;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 502

Multiple choice Boolean Expressions
What is printed? int count = 5; double size = 2.0; boolean first = count / size == count / 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 503

Multiple choice Boolean Expressions
What is printed? int amount = 14; int groups = 4; boolean p = amount / groups > 3; boolean q =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 504

Multiple choice Boolean Expressions
The variable count is a positive int. The requirement is to accept it when count / 5.0 is greater than 3.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 505

Multiple choice Boolean Expressions
An int variable n satisfies 0 <= n <= 50. Which list contains all…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 506

Multiple choice Boolean Expressions
What is printed? int score = 70; boolean passed = score >= 75; score += 10;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 507

Multiple choice Boolean Expressions
The int variables x and limit have already been initialized. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 508

Multiple choice Boolean Expressions
A lab grants access if a person is staff, or if the person is both a member and paid. A suspended person must always…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 509

Multiple choice Boolean Expressions
The int variables left and right store sensor readings. A warning should be true exactly when one reading is at least 10 and the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 510

Multiple choice Boolean Expressions
Three boolean variables a, b, and c record votes. A proposal passes only when…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 501 of 740
Page 51 of 74