Professional Documents
Culture Documents
4.1 Boolean Expresssions
4.1 Boolean Expresssions
1 Boolean
Expressions
SY 2020-2021 3rd Term
CS001L Computer Fundamentals and Programming 1
Laboratory
Objectives
This lesson aims to explain:
✓what a control structure is,
✓the difference between sequential,
selection, and iterative control,
✓the use of Boolean operators,
✓and the notion logically equivalent Boolean
expressions.
What is Control Structures?
sequential control
selection control
iterative contro
Control Structures
Boolean Expressions
(Conditions)
3
Operator Precedence and
Boolean Expressions
Try
this!
Short-Circuit (Lazy) Evaluation
if n ! = 0:
if 1/n < tolerance:
Logically Equivalent Boolean
Expressions
Logically Equivalent Boolean
Expressions
Try
this!
End
Thanks!