The following code:
print(float("1.3"))
- will print 1.3
- will raise a ValueError exception
- will print 1,3
- will print 13
Explanation: The float() function will successfully convert the string object “1.3” to a floating-point number, and print it to the console.
More Questions: Python Essentials 2 (PE2) Course Final Test
Please login or Register to submit your answer