by BlastRoom
Practice accessing, modifying, and iterating through lists using zero-based indexes.
#computer_science

40 questions
One question set, multiple game modes. Tap any game to see it in action. Not sure which to pick?
Answer to place stones and capture territory.
Outrun the snow together.
Earn blasts, then hunt the other team.
Answer to earn energy, then climb.

The class blasts through walls together.
Bid on mystery lots. Most money wins.
Sell tours. Nice, standard, or a total scam.
Answer, restock, and serve the rush.
More correct answers pulls the rope your way.
Answer, then shoot down the alien wave.
Answer, then tap to leap the frozen ridge.
In this pseudocode, the first element of a list is at index 0. What does colors[2] give? SET colors TO ["red", "green", "blue", "yellow"]
In this pseudocode, the last element of this four-item list is at index 3. What does animals[0] give? SET animals TO ["hawk", "otter", "lizard", "panda"]
The first element of this list is at index 0. What value is stored in temps[3]? SET temps TO [16, 19, 21, 18, 14]
A list begins indexing at 0. What does cities[1] return? SET cities TO ["Denver", "Miami", "Seattle", "Boston"]
The first element is at index 0. What is flags[4]? SET flags TO ["A", "B", "C", "D", "E"]
In this zero-based list, what does codes[2] give? SET codes TO [404, 200, 500, 301]
The first song is at index 0. Which song is playlist[1]? SET playlist TO ["Skyline", "Echo", "Drift", "Pulse"]
A list uses index 0 for its first element. What does scores[3] give? SET scores TO [8, 12, 5, 17, 10]
The first element of this list is at index 0. At which index does "violet" sit? SET shades TO ["amber", "blue", "violet", "gray"]
This list starts at index 0. What is the index of 42? SET values TO [15, 42, 9, 31]
In this list, the first element is at index 0. Where does "submit" appear? SET commands TO ["open", "save", "submit", "close"]
A zero-based list has the following elements. At which index is "Sat" stored? SET days TO ["Thu", "Fri", "Sat", "Sun", "Mon"]
The first item in this list has index 0. What index holds 64? SET powers TO [2, 4, 8, 16, 32, 64]
This list uses index 0 for its first element. Which index contains "north"? SET directions TO ["west", "east", "south", "north"]
In this pseudocode, the first list element is at index 0, and APPEND adds to the end. What does the last line display? SET fruit TO ["pear", "plum", "kiwi"] APPEND "mango" TO fruit SET fruit[2] TO "lime" DISPLAY fruit
The first list element is at index 0, and APPEND adds to the end. What is displayed? SET seats TO ["A1", "A2", "A3"] APPEND "A4" TO seats SET seats[0] TO "B1" DISPLAY seats
A list starts at index 0, and APPEND adds an element at the end. Trace this code. SET levels TO [3, 6, 9, 12] APPEND 15 TO levels SET levels[3] TO 10 DISPLAY levels
The first element is at index 0, and APPEND adds to the end. What does this code display? SET teams TO ["Orcas", "Bears", "Foxes"] APPEND "Ravens" TO teams SET teams[1] TO "Wolves" DISPLAY teams
In this zero-based list, APPEND adds to the end. What does the last line display? SET bits TO [1, 0, 1] APPEND 0 TO bits SET bits[2] TO 0 DISPLAY bits
The first element of this list is at index 0. APPEND adds to the end. Which list is displayed? SET notes TO ["do", "re", "mi", "fa"] APPEND "sol" TO notes SET notes[4] TO "la" DISPLAY notes
A list begins at index 0, and APPEND adds to the end. What is the result? SET tasks TO ["read", "code", "test"] APPEND "share" TO tasks SET tasks[1] TO "debug" DISPLAY tasks
The first list element is index 0, and APPEND adds to the end. What does this display? SET prices TO [4, 7, 11] APPEND 13 TO prices SET prices[0] TO 5 DISPLAY prices
The first element is at index 0. Which line changes only "medium" to "critical"? SET labels TO ["low", "medium", "high"]
This list has five elements and starts indexing at 0. SET planets TO ["Mercury", "Venus", "Earth", "Mars", "Jupiter"] Which index holds the last element?
A zero-based list is shown below. SET letters TO ["p", "q", "r", "s", "t", "u", "v"] What is the index of its last element?
This list uses index 0 for its first element. SET routes TO ["bus", "train", "bike", "walk"] Why would DISPLAY routes[4] cause a runtime error?
The first element is at index 0. SET months TO ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] Which expression reads the last element?
A list uses index 0 for its first element. SET ranks TO [10, 20, 30, 40, 50, 60, 70, 80] The list has eight values. What index is the final valid index?
This zero-based list is shown below. SET files TO ["report", "image", "data"] A program tries to read files[3]. Which statement correctly explains the problem?
What does the last line display? SET nums TO [4, 9, 2, 7] SET total TO 0 FOR EACH n IN nums SET total TO total + n DISPLAY total
Trace the loop and choose its output. SET points TO [3, 5, 8] SET total TO 0 FOR EACH point IN points SET total TO total + point DISPLAY total
What is displayed after this loop? SET words TO ["up", "go", "now"] SET message TO "" FOR EACH word IN words SET message TO message + word DISPLAY message
What does this pseudocode display? SET readings TO [12, 15, 11, 14] SET count TO 0 FOR EACH reading IN readings SET count TO count + 1 DISPLAY count
Follow the list iteration. What is displayed? SET codes TO [2, 4, 6, 8] SET total TO 0 FOR EACH code IN codes SET total TO total + code DISPLAY total
What output does this loop produce? SET tags TO ["A", "B", "C"] FOR EACH tag IN tags DISPLAY tag
Trace the accumulator in this code. What is the final value displayed? SET changes TO [-2, 5, -1, 4] SET total TO 0 FOR EACH change IN changes SET total TO total + change DISPLAY total
What does the last line display? SET names TO ["Ana", "Bo", "Cy"] SET result TO "Start: " FOR EACH name IN names SET result TO result + name DISPLAY result
The first element is at index 0. Which line changes the middle reading to 25? SET temps TO [18, 21, 19]
This list starts at index 0. Which line replaces "pending" with "done"? SET status TO ["new", "pending", "sent"]
The first element in this list is index 0. Which line changes only the last score to 100? SET scores TO [86, 91, 78, 84]
Crack the passcode before the zombies get in.
Answer, then swat bugs for bonus points.
Race through questions at your own speed.
Same question on every screen. Fastest wins.

Pick a tile, answer, hit bonuses and steals.
Python Syntax, print() and Comments
30 questions