Ch04_Logic8e_Solutions - Programming Logic and Design, 8e...

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

Programming Logic and Design, 8eSolutions 4-1Programming Logic and Design, 8th EditionChapter 4Review Questions1.A _____ expression has one of two values: true or false.a.Georgianb.Booleanc.Barbariand.Selective
2.In a selection, theelseclause executes _____.
3.The greater-than operator evaluates as true when _____.
4.A trivial Boolean expression is one that _____.
We have textbook solutions for you!
/Invitation-to-Computer-Science-8th-Edition-9781337561914-1191/
The document you are viewing contains questions related to this textbook.
Chapter 6 / Exercise 10
Invitation to Computer Science
Gersting/Schneider
Expert Verified
Programming Logic and Design, 8eSolutions 4-2c. is always falsed. always has the same value5. Ifx <= yis true, then _____.a.x = yis trueb.y <= xis truec.x > yis falsed.x >= y is false
6. Ifj <> kis true, then _____.
7. In an AND condition, the most efficient technique is to first ask the question that _____.
8. Ifmis true andnis false, then _____.
Programming Logic and Design, 8eSolutions 4-3c.m OR nis falsed. Ifmis true, thennmust be true.9. Ifpis true andqis false, then _____.a.p OR qis trueb.p OR qis falsec.p AND qis trued.pis greater thanq
10.Which of the lettered choices is equivalent to the following decision?if x > 10 thenif y > 10 thenoutput "X"endifendif
11.IfconditionAis 30 percent likely to be true andconditionBis 10 percent likelyto be true, then it is most efficient to testconditionAfirst _____.
12.Which of the following is a poorly written, trivial Boolean expression?
Programming Logic and Design, 8eSolutions 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?

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 96 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
NUM, sentinel value, dueMonth
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Invitation to Computer Science
The document you are viewing contains questions related to this textbook.
Chapter 6 / Exercise 10
Invitation to Computer Science
Gersting/Schneider
Expert Verified

Newly Uploaded Documents

Show More

Newly Uploaded Documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture