Float Conversion in Python
Level 120 keystrokes
This converts a string to a floating-point number. The float() function parses numeric strings.
Python code
# "3.14" is a string made of digits and a decimal point# float() turns it into the floating-point number 3.14, which is printed1print(float("3.14"))Output
3.14
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this Python code and how often they appear.
"× 2(× 2)× 2.× 1