PythonNumberfloat
int

floatNumber

divmod

Converts a value to a floating-point number.

Syntax

float(x)

Example

Enter values below to update the example in real time.

print
print(float("3.14"))  # 3.14
print(float(42))      # 42.0