zuai-logo
  • Home

  • Mock Exam

  • Cliffs

  • Study Set

  • Talk to ZuAI

  • Request a Feature

zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank

Boolean Logic & Conditional Statements

Question 1
1 mark
college-boardComputer Science AAPExam Style
1 mark

In Java, what is the value of the expression (5 > 3) == (8 > 6)?

Question 2
1 mark
college-boardComputer Science AAPExam Style
1 mark

What is one simple technique to ensure reliability when comparing two boolean expressions?

Question 3
1 mark
college-boardComputer Science AAPExam Style
1 mark

Which of the following is an equivalent boolean expression to "a || !a"?

Question 4
1 mark
college-boardComputer Science AAPExam Style
1 mark

Which of the following expressions is equivalent to the expression (!A || B) && A?

Question 5
1 mark
college-boardComputer Science AAPExam Style
1 mark

What is the result of simplifying the expression (p && q) || (p&&!q)||(!p&&q)?

Question 6
1 mark
college-boardComputer Science AAPExam Style
1 mark

Which expression remains true regardless of the values of the boolean variables M and N?

Question 7
1 mark
college-boardComputer Science AAPExam Style
1 mark

Which expression could replace '???' if ((a == b)&&(c)) { ??? } else { c = false; } ensures 'c' remains true when 'a' equals 'b'?

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
1 mark
college-boardComputer Science AAPExam Style
1 mark

Which operation can replace '&&' in the expression (x >= y) && (y != z) while maintaining equivalence?

Question 9
1 mark
college-boardComputer Science AAPExam Style
1 mark

What advantage do properly named classes and methods offer in terms of code maintenance?

Question 10
1 mark
college-boardComputer Science AAPExam Style
1 mark

In the given expression (X-->Y)==(!(X)||Y), which of the following represents its contrapositive while maintaining logical equivalence?