convert decimal to float python code example
Example 1: w=how to tell if decimal in python
i = 100
f = 1.23
print(type(i))
print(type(f))
# <class 'int'>
# <class 'float'>
Example 2: int to float python
a = 5
a = float(a) # int to float
i = 100
f = 1.23
print(type(i))
print(type(f))
# <class 'int'>
# <class 'float'>
a = 5
a = float(a) # int to float