![]() |
3.1: Boolean Expressions | 3.2: If Control Flow | 3.3: If Else | 3.4: Else If | 3.5 + 3.6 More Expressions | Unit 3 Homework |
Unit 3 Team Teach - 3.3
Unit 3 Team Teach
3.3 If Else Statements
Purpose of Else Statements
Else statements: Handles what happens when the if condition is false. Structure of If-Else:
- If statement with a condition.
- Else statement without a condition.
- Both parts have code blocks surrounded by {}.
- Based on this code, if you were younger than 16 what would it print out?
- Write your own if else statement