Literal Syntax

floats can be simply initialized by using numeric values or obtained as a result of an expression. Values must consist of integral and fractional parts separated by a dot.

Example 1

>>> 1.0
1.0
>>> 3.14
3.14
>>> 3.0/2
1.5
>>> 2.0 + 1.5
3.5