Making Choices
- Sep 9, 2017
- 1 min read

- Conditional Statement: Tell computer to run some codes bases on a condition
- Boolean expression: When a condition is true or false
- Six comparison operators: ==, !=, >, <, >=, <=
- Compound Boolean Expressions: && (AND), || (OR), ! (NOT)
- If conditional statement (if, else if, else)
- { goes on the same line as condition
- Code indented 4 spaces
- } goes on a new line
- Switch statement can branch out at anytime
Class Project: Students in grade 1 to 5. Each grade does a different project. Use Switch statement to display selected student project.
- Grade 1: Color of the rainbow
- Grade 2: How to bake cookies
- Grade 3: Tooth fairies
- Grade 4: Who is Santa
- Grade 5: My Little Pony
------------
Homework: Write a program to determine if a kid is tall enough to ride with an adult or by themselves. See picture for details.


































Comments