The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #152
print(float("NaN"))
NaN , standing for not a number, is a numeric data type used to represent any value that is undefined or unpresentable. When the the float() function is given "NaN" , with any uppercase/lower combination as an argument, it will return nan . (docs.python.org/3/library/functions.html#float)
What it the output of the code snippet below?
— The Python Quiz (@thepythonquiz) July 14, 2020
print(float("NaN"))
It will throw a ValueError error
nan
NaN
0
0.0#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: