-
What is Code?
-
Data
-
Input
-
Functions
-
Boolean logic and decisions
-
Loops
-
Modules
-
Examples
-
Exercises
Or instruction
We also have the ‘or’ instruction.
isCorrect = True or False
In this case the variable is assigned the value True
as the rules for or
are different to and
The rules are:
True or True is replaced by True
True or False is replaced by True
False or True is replaced by True
False or False is replaced by False
The or
instruction has the meaning, True
if either of the values are True
.