Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question # 2 dropdown you created a two - dimensional array with the fo…

Question

question # 2
dropdown
you created a two - dimensional array with the following code.
a = 20, tennis, blue
b = 15,soccer, green
alist = a, b
how do you refer to green?

Explanation:

Step1: Identify array structure

aList is a list of two sub - lists A and B. A = [20, 'tennis', 'blue'] and B = [15,'soccer', 'green'].

Step2: Determine indexing

In Python (assuming a Python - like context as it's a common language for arrays/lists), list indexing starts from 0. To access 'green' which is in the second sub - list (index 1) and third element of that sub - list (index 2), the reference is aList[1][2].

Answer:

aList[1][2]