1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Operation
A process using a symbol that performs a calculation or logical test on its operands, it can be arithmetic, comparison or boolean
Operand
The values that an operation applies to, e.g. in age > 18, both age and 18 are operands
+
Addition. This arithmetic operator sums operands, e.g. x + 4
-
Subtraction, or taking away one operand from another is done by this arithmetic operation, e.g. health - 5
*
Multiplication, the arithmetic operation that gives the product, or one operand times another, e.g. km * 2
/
Arithmetic operator that divides one operand by another e.g. total / 7
DIV
Also called integer division or floor division, the quotient arithmetic operator divides operands giving only the whole number result. E.g. 9 DIV 4 = 2. Python uses // for this.
MOD
The Modulus operator which gives the remainder after division, e.g. 9 MOD 4 = 1. Python uses % for this.
>
The comparison operator greater than
>=
The comparison operator greater than or equal to
<
The comparison operator less than
<=
The comparison operator less than or equal to
!=
The comparison operator not equal to
==
The comparison operator equal to
AND
Boolean operator that returns a true value only if both operands are true
OR
Boolean operator that returns a true value if either operand is true
NOT
Boolean operator that negates its operand, meaning True becomes False and vice versa