
Understanding List Indexing in Python

Quiz
•
Computers
•
9th Grade
•
Medium
Anthony Navarro
Used 5+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a Python list?
0
1
-1
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the list `colors = ['red', 'green', 'blue', 'yellow']`, what value does `colors[2]` return?
'red'
'green'
'blue'
'yellow'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to access the last element of a list named `numbers`?
numbers[0]
numbers[-1]
numbers[1]
numbers[len(numbers)]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If `fruits = ['apple', 'banana', 'cherry', 'date']`, what does `fruits[-2]` return?
'apple'
'banana'
'cherry'
'date'
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the list `nums = [10, 20, 30, 40, 50]`, which code will print the third element?
print(nums[2])
print(nums[3])
print(nums[1])
print(nums[0])
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose you have `letters = ['a', 'b', 'c', 'd', 'e']`. Which statement will output 'd'?
print(letters[3])
print(letters[4])
print(letters[-1])
print(letters[2])
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If `animals = ['cat', 'dog', 'rabbit', 'hamster']`, which of the following will cause an IndexError?
animals[0]
animals[-1]
animals[4]
animals[2]
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given `data = [5, 10, 15, 20, 25]`, what will `data[-3]` return?
5
10
15
25
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You have a list `grades = [88, 92, 79, 93, 85]`. Write a single line of code to print the highest grade using list indexing.
print(grades[1])
print(grades[-2])
print(grades[3])
print(grades[2])
Similar Resources on Wayground
10 questions
AP CSP - Python Lists and Arrays

Quiz
•
9th - 12th Grade
14 questions
iGCSE CS - Printers

Quiz
•
9th - 10th Grade
10 questions
Python Quiz

Quiz
•
9th Grade
14 questions
Python Basics

Quiz
•
9th - 12th Grade
10 questions
Quiz1_HPB2021_2010t1

Quiz
•
1st - 12th Grade
10 questions
Guided Note 5.3 For Loop and List

Quiz
•
9th - 12th Grade
10 questions
Python list

Quiz
•
9th Grade
12 questions
Java Loops

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade