Integer or Int
Description
Whole number
Used for counting
Used for arrays indices (rows of data)
Examples:
Processing:
JavaScript:
Python:
Do not use commas in your numbers!
Shortcuts (Assignment Operators)
Quick Math
+= means “add this”
-= means “subtract this”
*= means “multiply it by this”
/= means “divide it by this”
This updates the variable when used
Example:
Processing, Java-based, and C-based:
Python:
Adding or Subtracting 1
variableName++ means “add 1” or variableName += 1
variableName-- means “subtract 1” or variableName -= 1
This updates the variable when used
Examples:
Processing, Java-based, and C-based:
This ++ shortcut after the variable name does not work in python.
Last updated
Was this helpful?