Codele / Programming basics
True and false
A computer can ask a question and get only one of two answers: true or false. Combine answers with and, or and not to make a rule, like when you may go out to play.
- A comparison asks a question and answers true or false: bigger (>), smaller (<), equal (==), not equal (!=).
- Two equals signs ask “are these the same?”. One equals sign puts a value in a box.
- and is True only when both sides are True.
- or is True when at least one side is True.
- not flips an answer: True becomes False and False becomes True.
Loading the playable lesson…