make number float python code example Example 1: declare float python myfloat = 7.0 Example 2: int to float python a = 5 a = float(a) # int to float