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 231–240 of 357
  1. 231
  2. 232
  3. 233
  4. 234
  5. 235
  6. 236
  7. 237
  8. 238
  9. 239
  10. 240

Question 231

Multiple choice Boolean Expressions
What is the value of bonus after the following code segment is executed? int pts = 85; int bonus = 0; if (pts >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 232

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 233

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 234

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 235

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 236

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 237

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 238

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 239

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 240

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 231 of 357
Page 24 of 36