Screen Link: https://app.dataquest.io/m/312/lists-and-for-loops/2/indexing

My Code:

row_1 = [‘Facebook’, 0.0, ‘USD’, 2974676, 3.5]

row_2 = [‘Instagram’, 0.0, ‘USD’, 2161558, 4.5]

row_3 = [‘Clash of Clans’, 0.0, ‘USD’, 2130805, 4.5]

ratings_1 = row_1[3.5]

ratings_2 = row_2[4.5]

ratings_3 = row_3[4.5]

total = ratings_1 + ratings_2 + ratings_3

average = total/3

What I expected to happen:

For the machine to print correct answer.

What actually happened:

TypeErrorTraceback (most recent call last)

in ()

3 row_3 = [‘Clash of Clans’, 0.0, ‘USD’, 2130805, 4.5]

4

----> 5 ratings_1 = row_1[3.5]

6 ratings_2 = row_2[4.5]

7 ratings_3 = row_3[4.5]

TypeError: list indices must be integers, not float```

Paste output/error here

TypeErrorTraceback (most recent call last)

in ()

3 row_3 = [‘Clash of Clans’, 0.0, ‘USD’, 2130805, 4.5]

4

----> 5 ratings_1 = row_1[3.5]

6 ratings_2 = row_2[4.5]

7 ratings_3 = row_3[4.5]

TypeError: list indices must be integers, not float