Question 1 of 10
colors = ["red","green","blue"] (1-based). What is colors[2]?
- A. green
- B. blue
- C. 2
- D. red
colors = ["red","green","blue"] (1-based). What is colors[2]?
items=[4,8,15,16]. INSERT(items,2,99) then APPEND(items,1). Final list?
pets=["cat","dog","bird","fish"]. REMOVE(pets,2) then REMOVE(pets,2). Final?
nums=[10,20,30]. After INSERT(nums,1,5), LENGTH(nums)?
bag=[2,4,6,8]. REMOVE(bag,3) then INSERT(bag,3,7). Correct after each step?
| After REMOVE | After INSERT |
|---|---|
| ? | ? |
scores=[9,9,9]. APPEND(scores,10). scores[4]?
letters=["a","b","c","d"]. x โ letters[3] then letters[1] โ x. Final letters?
q=[1,2,3]. INSERT(q,4,9) then REMOVE(q,1). Final?
shop=["milk","eggs","bread"]. After REMOVE(shop,3), LENGTH and shop[2]?
Which statement about AP CSP lists is true?