Integer to float
Input
create_float(5)
Output
5.0
The integer 5 converted to float is 5.0.
Full lesson preview
Convert a numeric value into a float. Practice simple type conversion and returning values from functions.
Problem statement
Task
Examples
Input
create_float(5)
Output
5.0
The integer 5 converted to float is 5.0.
Input
create_float(3.7)
Output
3.7
A float input should be returned as the same float value.
Input format
Output format
Constraints
Samples
Input
create_float(2)
Output
2.0
2 becomes 2.0 when converted to float.