Numbers in Python are the same as those in mathematics, and various calculations can be realized through various operators. In Python, there are four data formats of numeric types: integer, floating point, complex and Boolean.
Specific application of floating-point number
1, floating-point numbers correspond to real numbers mathematically. Because the number of floating-point numbers stored in computer memory is limited, it will end approximately after exceeding the specified length. So floating-point numbers are not necessarily exact values.
2. The floating-point number type is consistent with the concept of real number in mathematics, and a numerical value is represented by a decimal.
3.Python language requires that all floating-point numbers must have a decimal part, and the decimal part can be 0 to distinguish floating-point numbers from integer types.
4. There are two representations of floating-point numbers: decimal representation and scientific notation.
5. Role: generally record salary, height, weight, etc.
6. For example:
10 10 is an integer and 10 10.0 is a floating-point number.
Height = 1.80
Weight = 60.0
Print (Type (Height))
0.0,77,-3. 14,96e4,4.3e-3,9.6E5 .