Question # 6

Multiple Choice
What will you see after on the next line?

>>> int("3.9")

Responses

3
3

an error statement
an error statement

3.9
3.9

4

1 answer

The correct response is:

an error statement

The int() function in Python cannot convert a string that represents a float (like "3.9") directly into an integer, so it will raise a ValueError.