Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 1,131–1,140 of 3,140
  1. 1131
  2. 1132
  3. 1133
  4. 1134
  5. 1135
  6. 1136
  7. 1137
  8. 1138
  9. 1139
  10. 1140

Question 1131

Multiple choice Unit 2: Selection and Iteration
Consider the following code. int x = 4; int y = 1; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1132

Multiple choice Unit 2: Selection and Iteration
public static String classify(int score) { String result = ""; if (score >= 90) result = "A"; if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1133

Multiple choice Unit 2: Selection and Iteration
public static int mystery(int x) { int y = 1; while (x > 1 && y <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1134

Multiple choice Unit 2: Selection and Iteration
public static boolean check(int num) { return num > 0 && num % 2…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1135

Multiple choice Unit 2: Selection and Iteration
public static String evaluate(int temperature, boolean isRaining) { String result; if (temperature > 30 && !isRaining) { result = "beach"; }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1136

Multiple choice Unit 2: Selection and Iteration
Consider the following boolean expression: !(x >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1137

Multiple choice Unit 2: Selection and Iteration
public static int mystery(int value) { int result = 0; while (value > 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1138

Multiple choice Unit 2: Selection and Iteration
public static int countDown(int start) { int count = 0; for (int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1139

Multiple choice Unit 2: Selection and Iteration
public static boolean isSpecial(int num) { return num…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1140

Multiple choice Unit 2: Selection and Iteration
public static int process(int limit) { int total = 0; for (int i = 1;i <=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,131 of 3,140
Page 114 of 314