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 #171

```
print(float("inf") == float("infinity"))
```

That is true! The function float() works with both "inf" and "infinity" . Also, Python considers that float("inf") and float("inf") are equal as described with the __eq__() method. (blog.usejournal.com/how-to-work-with-infinity-in-python-3...)

What it the output of the code snippet below?

— The Python Quiz (@thepythonquiz) November 10, 2020

print(float("inf") == float("infinity"))

True

False#python #python3 #pythonprogramming #learnpython

Question difficulty: π΅π΅π΅π΅π΅