assign float in python code example Example 1: declare float python myfloat = 7.0 Example 2: how to convert int in python score = 89 score = str(score)