[COP 2510] - Final Exam Guide - Everything you need to know! (34 pages long)

882 views34 pages

Document Summary

Flow of control refers to the order of statement execution. Linear (one statement after another in sequence) Selective (choose whether to execute a particular statement) Repetitive (choose to execute a statement over and over) Decisions are based on boolean expressions or conditions. Recall: conditions evaluate to true and false. == equal to (don"t confuse with =) Boolean expressions can also use logical operators. Logical not is unary operator (uses one operand) Logical and and logical or are binary operators (uses two operands) If condition a is true, then !a is false; If a is false, then !a is true. The logical and expression: a && b. Is true if both a and b are true, and false otherwise. The logical or expression: a b. Is true if a or b or both are true, and false otherwise. Logical operators can be described using a truth table: B true true true false false false false.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents