Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 51–60 of 316
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

Multiple choice Boolean Expressions
In order to ride the zip line, you need to be at least 12 years old and weigh at least 75 pounds, but no more than 300 pounds. Which of the following code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 52

Multiple choice Boolean Expressions
Given the following: if (x > y) { y *= 2; } else if (y > x) { x *= 2; } if (x > y) { y *= 2; } if (y…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 53

Multiple choice Boolean Expressions
Assuming weekday and holiday are properly initialized booleans, which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 54

Multiple choice Boolean Expressions
What values for x and y will cause the program to execute the /* missing code */? if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 55

Multiple choice Boolean Expressions
Christine will go to the beach if it's not raining and if it's between 75°F and 95°F.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 56

Multiple choice Boolean Expressions
Vehicles are classified based on their total interior volume. The classify method is intended to return a vehicle classification String value based on total…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 57

Multiple choice Boolean Expressions
Which of the following best describes the value of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 58

Multiple choice Boolean Expressions
Consider the following code segment. int x = / * some integer value * /; int y = / * some integer value * /; if (x > y && x % 2 == 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 59

Multiple choice Boolean Expressions
Consider the following code segment. Assume that x and y are properly declared and initialized integer variables. int z = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 60

Multiple choice Boolean Expressions
Consider the following code segment. Assume that value is a properly declared and initialized integer variable. if (value < 7) { value + = value;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 51 of 316
Page 6 of 32