Please enable JavaScript.
Coggle requires JavaScript to display documents.
VARIABLES AND OPERATORS - Coggle Diagram
VARIABLES AND OPERATORS
-
Arithmetic Operators
-
-
-
Real/Float Division
-
-
Always returns a float, even if answer is a whole number
In other languages, done using floats in the divisor
Integer division
//
(Python) or using floats in the divisor (Java, C#, etc)
-
-
Exponentiation
**
or math.pow(index, exponent)
-
Can be used for square rooting, etc (using fractional exponents)
-
-
Constants and Variables
Constants
-
-
-
-
e.g. PI, E, PLAYER_SPEED, etc
Variables
-
-
e.g. score, ammo, request, etc.
-
Boolean Operators
-
-
-
AND
-
True if both operands are True, else False
OR
-
True if either input is True, else False
-
-
XOR
^
(bitwise, but can be used conditionally)
True if either operand is True, but not if they both are
-
-