Boolean logic

November 4, 2020 ยท View on GitHub

We expect students to know booleans (TRUE and FALSE) as a concept, and be familiar with logical AND, OR, NOT.

Track specific exercises could cover precedence or unusual rules around boolean logic, but should not try to teach it from scratch.

Exercises

Pac-man game logic

This exercise looks at various game events and determine if they have occured by looking at various game states. The reference implementation (Elixir) teaches:

  • Boolean values
  • Boolean operators
  • Boolean operator precedence

Implementations

TrackExerciseChanges
ElixirbooleansNone

RPG game logic

This exercise determines whether specific characters are awake (true or false) and checks whether a certain plan will work or not dependent on which characters are sleeping. The reference implementation (JavaScript) teaches:

  • Boolean values
  • Boolean operators
  • Boolean operator precedence

Implementations

TrackExerciseChanges
C#annalyns-infiltrationNone
F#booleansNone
JavaScriptbooleansNone
PureScriptbooleansNone