PYTHON NUMERIC DATA TYPE
Thera are three numeric data types in Python
- int
- float
- complex
INT
Int / integer, is a whole number, positive or negative, without decimals, of unlimited length.
|
a = 10 b = 9100400110 c = -4321 print(a) print(b) print(c) print(type(b)) OUTPUT 10 9100400110 -4321 <class 'int'> |
FLOAT
Float containg positve or negative one or more decimal values
|
a = 10.5 b = 9100400110.9 c = -4321.2 print(a) print(b) print(c) print(type(c)) OUTPUT 10.5 9100400110.9 -4321.2 <class 'float'> |
COMPLEX
|
|