Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

what will you see on the next line? >>> alist = 9, 2, 3.5, 7 >>> alist.…

Question

what will you see on the next line?

>> alist = 9, 2, 3.5, 7
>> alist.index(3.5)

2
3
3.5
true

Explanation:

Step1: Recall list index rule

In Python, list indices start from 0.

Step2: Find index of element

For aList = [9, 2, 3.5, 7], the index of 3.5 is 2 since it is the third element and 3 - 1 = 2.

Answer:

A. 2