Data Types · Lesson 29 of 76

Numbers

Python has two everyday number types: whole numbers (int) and decimals (float):

Python

Convert from text to a number when you need to do maths with it:

Python

Your turn: turn the string "3.14" into a float and double it.

Check your understanding

You’re reading for free. Sign in to keep your progress and earn a certificate when you finish.Sign in to keep my progress →

Lesson 29 of 76