227k views
3 votes
If we have the following array/list:

myList["red", "orange", "yellow", "green", "blue", "indigo", "violet"]

What value is at myList[1]?

a
red
b
orange
c
yellow
d
green
e
blue
f
indigo
g
violet

User Bender
by
6.0k points

2 Answers

0 votes

Answer:

the answer is

B. Orange

Step-by-step explanation:

This problem bothers on indexing in computer programming, most programming languages indexes from 0, so that the the first item in the list corresponds to zero(0) the second item correspond to 1 etc.

In this problem myList[1] corresponds to the second item on the list which is "orange"

User Oguk
by
5.7k points
3 votes

Answer:

The correct answer is A) "red"

Step-by-step explanation:

Using arrays and lists are very helpful when writing programs. They help simplify programs by storing related data under one name.

In the question above the general name is myList. The related data are red, orange, yellow, green, blue, indigo, and violet.

This means that myList contains values a,b,c,d,e,f, and g. However myList[1] only contains value "red".

Cheers!

User Aeisha
by
5.7k points