Topic 3.5 Boolean Expressions

  • boolean value: True or False
  • We can evaluate expressions using relational operators.
    • Include equals, not equals, greater than, less than, greater than or equal to, less than or equal to
  • Not Operator: will flip the result of a statement
  • And Operator: both expressions have to be true to make the entire statement true
  • Or Operator: Only one condition must be true to make the entire statement true

Ideas

  • Code which student needs to alter in order to result in specified boolean value
  • Ask student to create code based on scenario, and display certain results.
  • Display to show how code segments are evaluated.

Topic 3.6 Conditionals

  • Algorithm: finite set of instructions that accomplish a specific task
  • Combinations of sequencing, selection, and iteration
  • Selection: allows us to choose different outcomes based on a decision or result
  • if statements: act on code if the if statement is true
  • if-else statement: ace on if the if statement is true, act on else if the statement is false

Ideas

  • Demonstrate examples of if statements, and how response will differ based on the conditions
  • If statement in an algorithm

Topic 3.7 Conditionals

  • Nested conditional: a conditional inside of a conditional
  • Can use nested conditionals in algorithms in order to to determine answers and printed statements

Ideas

  • Ask students to create an algorithm which determines something based on nested statements.