Arithmetic operators in programming

Cards (5)

  • The exponentiation operator raises a number to an exponent (power). In Python, this is represented as **, e.g. 2**3=8.
  • The modulus operator returns the remainder when one number is divided by another.
  • In Python, the modulus operator is represented as %
  • Integer division, sometimes known as floor division, is when any remainder of a division is discarded and you are only left with a whole number (an integer).
  • In Python, integer division is represented using //, e.g. 12//5=2.