Single Choice Not Set

QWhat will be the output after the following statements?
x = [1.0, 2.0, 3.0]
print(x[int(2.0)])

ID: #3979 Python Errors and Exceptions Handling 327 views
Question Info
#3979Q ID
Not SetDifficulty
Python Errors and Exceptions HandlingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 2 ✔ ✖
  • B 3.0 ✔ ✖
  • C TypeError ✔ ✖
  • D IndexError ✔ ✖
Correct Answer

Explanation

3.0

Share This Question

Challenge a friend or share with your study group.