208k views
23 votes
In the list [0, 13, 5.4, "integer"], which element is at index 2?

A.0
B.13
C.5.4
D.“integer”

1 Answer

6 votes

Answer: C) 5.4

The index starts at 0

  • index 0 = 0
  • index 1 = 13
  • index 2 = 5.4
  • index 3 = "integer"

If there are n elements in a list, then the index ranges from 0 to n-1.

User Mxyk
by
4.9k points