
List 2
Quiz
•
Other
•
12th Grade
•
Practice Problem
•
Easy
Amy Austin
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does negative indexing in Python lists start with?
-1 referring to the last item
0 referring to the first item
1 referring to the second item
-2 referring to the second last item
Answer explanation
Negative indexing in Python lists starts with -1, referring to the last item in the list.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to determine if an item is present in a list?
in keyword
exists() method
check() method
find() method
Answer explanation
The 'in' keyword is used to determine if an item is present in a list, making it the correct choice among the options provided.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of print(thislist[2:5]) if thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]?
['banana', 'cherry', 'orange', 'kiwi']
['cherry', 'orange', 'kiwi', 'melon']
['banana', 'cherry', 'orange']
['cherry', 'orange', 'kiwi']
Answer explanation
The result of print(thislist[2:5]) will be ['cherry', 'orange', 'kiwi'] because it selects elements starting from index 2 up to, but not including, index 5 from the list thislist.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access the last item of a list?
Using the index 0
Using the index -1
Using the index 1
Using the method last()
Answer explanation
To access the last item of a list, you can use the index -1. This is because -1 represents the last element in a list in Python.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you slice a list in Python to obtain a subset of its elements?
By specifying the start and end index of the slice
Using a specific list method designed for slicing
By specifying the maximum value to include
Using the list's length property
Answer explanation
To obtain a subset of elements from a list in Python, you can slice it by specifying the start and end index of the slice.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first item in a Python list?
It does not have an index
1
-1
0
Answer explanation
The index of the first item in a Python list is 0, making the correct answer choice '0'. Lists in Python are zero-indexed, meaning the first element is at index 0.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you want to return the items from the beginning to, but NOT including, 'kiwi', which slicing would you use?
[:4]
[:-3]
[:3]
[0:-3]
Answer explanation
To return items from the beginning to, but not including, 'kiwi', you would use the slicing [:4] as it includes items up to index 3 but not including index 4 where 'kiwi' is located.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
French Beginner
Quiz
•
4th Grade - Professio...
8 questions
harry styles
Quiz
•
1st - 12th Grade
15 questions
Present Simple- Passive Voice
Quiz
•
7th Grade - University
15 questions
Battle of the Brains 2019: Class Qualification
Quiz
•
7th - 12th Grade
12 questions
Back to the 80s!
Quiz
•
9th Grade - University
15 questions
Head Anatomy
Quiz
•
9th - 12th Grade
10 questions
LES COULEURS EN FRANÇAIS
Quiz
•
1st - 12th Grade
10 questions
Foods 1 - 3.02 Dairy 10Q
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
11 questions
Exponent Quotient Rules A1 U7
Quiz
•
9th - 12th Grade
