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 121–130 of 357
  1. 121
  2. 122
  3. 123
  4. 124
  5. 125
  6. 126
  7. 127
  8. 128
  9. 129
  10. 130

Question 121

Multiple choice Boolean Expressions
At a certain high school students receive letter grades based on the following scale. Numeric Score Letter Grade 93 or above A From 84 to 92 inclusive B From 75…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 122

Multiple choice Boolean Expressions
Consider the following code segment. int num1 = 9; int num2 = 5; if (num1 > num2) { System.out.print((num1 + num2) %…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 123

Multiple choice Boolean Expressions
Consider the following code segment. int value = initValue; if (value > 10) if (value > 15) value = 0; else value =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 124

Multiple choice Boolean Expressions
Assume that a, b, and c have been declared and initialized with int values. The expression !(a > b || b…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 125

Multiple choice Boolean Expressions
A high school class places students in a course based on their average from a previous course. Students that have an average 92 or above are placed in an honors…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 126

Multiple choice Boolean Expressions
Assume that x, y, and z have been declared as follows: boolean x = true; boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 127

Multiple choice Boolean Expressions
Consider the following code segment. int amount = initValue; if (amount…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 128

Multiple choice Boolean Expressions
Which segment of code will correctly print the two Strings name1 and name2 in alphabetical order? if (name1 < name2) System.out.println(name1 + " " + name2); I.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 129

Multiple choice Boolean Expressions
If a, b, and c are integers, which of the following conditions is sufficient…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 130

Multiple choice Boolean Expressions
Consider the following code segment. int num = 0, score = 10; if (num != 0 && score / num >…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 121 of 357
Page 13 of 36