Python 3D Academyবাংলা

Numbers & Operators in Python

Chapter 3: Numbers & Operators

4 short lessons, with 3D animations, quizzes and coding tasks.

The lessons

  1. Arithmetic: + - * /

    Python works out maths with the four operators + - * /, and / always gives a float.

  2. Floor division, remainder and power

    // counts how many full groups fit, % gives what's left over, and ** multiplies a number by itself again and again.

  3. Which comes first? Operator order

    Python works out ( ) first, then **, then * / // %, then + -, and operators on the same level go left to right.

  4. Shortcuts and number tools

    x += 3 is a short way to write x = x + 3, and Python has ready-made number tools like round, abs, max, min and the math module.