-
What is Code?
-
Data
-
Input
-
Boolean logic and decisions
-
Loops
-
Modules
-
Examples
-
Exercises
Not instruction
Another common boolean instruction is the not instruction.
Not just inverts the value, so
not True
is replaced by the value False, and
not False
is replaced by the value True
This makes more sense when using named variables as it can read more clearly
isSeanHappy = not isRaining and isSunny