ECS 10 Lecture Notes - Lecture 10: Operand, George Boole, Boolean Expression

32 views2 pages

Document Summary

Flexibility: want programs to be useful in many situations, not just one pre-coded situation, employ conditional statements to allow it to adapt to different situations, conditional statements. Allows us to choose which statement will be executed next based on a boolean expression: boolean expression. A test which returns either true or false when it is evaluated. Named after george boole (1815-1864: boolean logic is credited with laying the foundations for the information age. And: true only when both operands are true. Or: true when either operand is true. Followed by an indented block statement: one or more consecutive lines all indented by the same amount. If boolean is true, then the statement is executed, otherwise it is ignored. If boolean is false, then the else statement is executed. One or the other has to happen. Functional design: design program using functions. Can i reuse a function i"ve already de ned to solve a simpler part .

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
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents