Please enable JavaScript to use CodeHS

IB Computer Science Higher Level (Year One) (2021)

Boolean Expressions and if Statements

Students learn the syntax and proper use of conditional statements in Java, as well as how to implement Boolean variables in their programs by writing Boolean expressions with relational and logical operators.

Lessons

9.1 Boolean Expressions and if Statements

  • Comparison Operators
  • Comparison Operators
  • Old Enough To Vote
  • Grade Range
  • Equality of Strings
  • +3 more

9.2 if Statements and Control Flow

  • If Statements
  • If Statements
  • Can Vote
  • Negative Numbers
  • Rectangle
  • +4 more

9.3 if-else Statements

  • If-Else Statements
  • If-Else
  • Bill with add tip
  • Even and Odd
  • Positive or Negative
  • +3 more

9.4 else if Statements

  • else-if Statements
  • else-if
  • Add Tip
  • Add Tip - 8 or 4 Customers
  • Add Tip - 8, 4, 2 Customers
  • +4 more

9.5 Compound Boolean Expressions

  • Compound Boolean Expressions
  • Logical Operators
  • Light Switch
  • Number in Range
  • Pizza Slices
  • +4 more

9.6 Equivalent Boolean Expressions

  • Equivalent Boolean Expressions
  • De Morgan's Laws
  • De Morgan AND
  • De Morgan OR
  • Amusement Park
  • +3 more

9.7 Comparing Objects

  • Comparing Objects
  • Comparing Objects
  • Comparing Strings
  • Comparing Rectangles
  • Null Test
  • +5 more

9.8 Boolean Expressions and if Statements Quiz

  • Boolean Expressions and If Statements Quiz