Flow Control
- Program is statements to be executed in an order
- Flow control is all about controlling the sequence
- we will skip certain lines or execute certain lines multiple times
- We have two types
- conditional statements:
- They help in skipping statements
- popular:
- if (if else, if elseif, )
- switch/case
- looping constructs:
- The help in executing statement(s) multiple times
- popular:
- while
- do while
- for
- foreach
- Variable assignment
pi = 3.14
radius = 5
area = pi * radius * radius
- Operator,Operands: Watch classroom video
- Operator precedence: Priority for operators
- Types of Operators
- Arthimetic
- Logical
- Comparision
- Assignment
- Bitwise
Lets write algorithms