C-16-Q147mediumsingle_mcq
Which of the following CORRECTLY converts the string "3" to a float?
Which of the following CORRECTLY converts the string "3" to a float?
- a
int("3") - b
str("3") - c
float("3") - d
bool("3")
ব্যাখ্যা
The float() function converts the string "3" into the floating-point number 3.0. The other functions either produce an integer, keep it a string, or convert it to a Boolean.