1/10
This set covers the fundamental definitions and logic of conditional statements and operators based on the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
if
A control structure that evaluates if a specific condition is true, translating to: 'If this IS true, do this…'
else
A block of code that executes when the previous conditions are not met, translating to: 'If the above was NOT met, then do this other thing…'
if-else execution rule
Considered as two opposite paths that never execute at the same time; only one of the two is ever executed.
==
A comparison operator that translates to 'equal to'.
!=
A comparison operator that translates to 'different from'.
> / <
Comparison operators that translate to 'greater' and 'less' respectively.
>= / <=
Comparison operators that translate to 'greater or equal' or 'less or equal' respectively.
and
A logical operator where both conditions must be true for the whole expression to be true.
or
A logical operator where at least one of the conditions must be true for the whole expression to be true.
% (Modulus)
An operator used to find the remainder of a division; for example, 65%2 equals 1 because 65÷2=32.5, leaving a remainder of 1.
else if
A statement used to evaluate a new condition if the initial if condition was false, as seen in evaluating if a numero is less than 0.