Casting -> Float

Casting er at konvertere en string eller en integer til en float.

# Casting

# Integer/string -> float

print(float.__doc__) # Convert a string or number to a floating point number, if possible.

float(3) # 3.0

3 / 1 # 3.0

float("3.14159") # 3.14159