Variable - Number
Python supports three types of numbers - integers(whole numbers), floating point numbers(decimals) and also supports complex numbers.
Number Type
Descriptions
Syntax
int
integer
whole number
positive/negative
no decimals
x = 5
y = -1024
z = 102455638029
float
decimals
positive/negative
with an ‘e’
x = 3.7
y = -4.2
z = 12e4
complex
with a ‘j’
z = 4j
Last updated