Control Flow

3 class hours

Control Flow: if-else

  • What is control flow: sequential v. conditional
  • Flow-charting
  • Anatomy of an if-else statement
  • Tracing an if-else statement

Slides

Boolean Expressions

  • Simple bool expressions
  • Compound expressions using cp::and, cp::or, and cp::not
  • Hands-on examples

Slides

Variants of if-else

  • if without else
  • if-else chain
  • Solving a problem using flow-chart and pattern

Slides

Previous
Next