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.

Subtopic: Boolean Expressions Clear filter

Questions 241–250 of 357
  1. 241
  2. 242
  3. 243
  4. 244
  5. 245
  6. 246
  7. 247
  8. 248
  9. 249
  10. 250

Question 241

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 242

Multiple choice Boolean Expressions
An integer score is eligible when it is from 60 through 100 inclusive, except…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 243

Multiple choice Boolean Expressions
For integer x from 0 through 12 inclusive, how many values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 244

Multiple choice Boolean Expressions
A positive integer n earns a bonus when it is divisible by 3 or by 5, but not by both. Values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 245

Multiple choice Boolean Expressions
What is printed? int a = 8; int b = 3; boolean first = a / b == 2 || a % b == 0 && a < b;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 246

Multiple choice Boolean Expressions
The int variables n and d satisfy -20 <= n <= 20 and -5 <= d <= 5. A result must be true exactly when d is positive and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 247

Multiple choice Boolean Expressions
What happens when this code runs? int divisor = 0; int total = 12; boolean ready = false;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 248

Multiple choice Boolean Expressions
What happens when this code runs? int total = 9; int group = 3; boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 249

Multiple choice Boolean Expressions
Each offered value replaces the comment in a separate run. Which value causes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 250

Multiple choice Boolean Expressions
What happens when this code runs? int zero = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 241 of 357
Page 25 of 36