Ch04_Logic8e_Solutions - Programming Logic and Design 8e Solutions 4-1 Programming Logic and Design 8th Edition Chapter 4 Review Questions 1 A

Ch04_Logic8e_Solutions - Programming Logic and Design 8e...

This preview shows page 1 - 5 out of 96 pages.

Programming Logic and Design, 8e Solutions 4-1 Programming Logic and Design, 8th Edition Chapter 4 Review Questions 1.A _____ expression has one of two values: true or false. a.Georgianb.Booleanc.Barbariand.Selective 2.In a selection, the elseclause executes _____. 3.The greater-than operator evaluates as true when _____. 4.A trivial Boolean expression is one that _____.
Image of page 1
Programming Logic and Design, 8e Solutions 4-2 5. If x <= yis true, then _____. a. x = yis trueb. y <= xis true c. x > yis falsed. x >= y is false 6. If j <> kis true, then _____. 7. In an AND condition, the most efficient technique is to first ask the question that _____. 8. If mis true and nis false, then _____.
Image of page 2
Programming Logic and Design, 8e Solutions 4-3 9. If pis true and qis false, then _____. a. p OR qis trueb. p OR qis falsec. p AND qis trued. pis greater than q 10.Which of the lettered choices is equivalent to the following decision? 11.If conditionAis 30 percent likely to be true and conditionBis 10 percent likely to be true, then it is most efficient to test conditionAfirst _____. 12.Which of the following is a poorly written, trivial Boolean expression?
Image of page 3
Programming Logic and Design, 8e Solutions 4-4 13.Which of the following is a trivial Boolean expression? a.k < b AND k > bb.m = 10 OR m = 20c.n > 12 OR p > 12d.q > 10 AND q < 19 14.Which of the following is a trivial Boolean expression?
Image of page 4
Image of page 5

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture