COM
Ch04_Logic8e_Solutions

Ch04_Logic8e_Solutions - Programming Logic and Design 8e...

Info icon This preview shows pages 1–5. Sign up to view the full content.

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. Georgian b. Boolean c. Barbarian d. Selective 2. In a selection, the else clause executes _____. 3. The greater-than operator evaluates as true when _____. 4. A trivial Boolean expression is one that _____.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Programming Logic and Design, 8e Solutions 4-2 5. If x <= y is true, then _____. a. x = y is true b. y <= x is true c. x > y is false d. x >= y is false 6. If j <> k is true, then _____. 7. In an AND condition, the most efficient technique is to first ask the question that _____. 8. If m is true and n is false, then _____.
Image of page 2
Programming Logic and Design, 8e Solutions 4-3 9. If p is true and q is false, then _____. a. p OR q is true b. p OR q is false c. p AND q is true d. p is greater than q 10. Which of the lettered choices is equivalent to the following decision? if x > 10 then if y > 10 then output "X" endif endif 11. If conditionA is 30 percent likely to be true and conditionB is 10 percent likely to be true, then it is most efficient to test conditionA first _____. 12. Which of the following is a poorly written, trivial Boolean expression?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Programming Logic and Design, 8e Solutions 4-4 13. Which of the following is a trivial Boolean expression? a. k < b AND k > b b. m = 10 OR m = 20 c. n > 12 OR p > 12 d. q > 10 AND q < 19 14. Which of the following is a trivial Boolean expression?
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '15
  • NUM, sentinel value, dueMonth

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern