83.9k views
1 vote
Why is the answer B?

Why is the answer B?-example-1

1 Answer

6 votes

Answer:

The first for loop will add =["1", "2",..............."10"]

The second for loop will delete 1, 3, 5, 7, 9

Since, k = 1 and the k = 1+2 =3 and so on till 9, and not 11 as 11 is more than 10.

And hence, the output will be [2,4,6,8,10] and which is B.

Step-by-step explanation:

B is the correct answer, and as explained in the answer section.