Skip to content

Numbers and maths

Python · Free lesson · No account needed

Step 1 of 9 · Start here

Numbers and maths

Start here

Python has two main kinds of number:

  • an int is a whole number, such as 7 or -3
  • a float has a decimal point, such as 3.5 or 2.0

Python's maths operators are +, -, * (times), / (divide), // (whole-number divide), % (remainder) and ** (power). As in maths, * and / happen before + and -, and brackets go first.

You’re trying a free lesson. Your progress saves on this device. Create a free account to keep it everywhere and ask the AI tutor.