Indexing & Slicing
Quiz
•
Information Technology (IT)
•
Professional Development
•
Practice Problem
•
Medium
KSR Datavizon
Used 2+ times
FREE Resource
Student preview

5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of my_list = [1, 2, 3, 4, 5], print(my_list[-2])?
4
2
5
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you slice the first three elements from a list my_list?
my_list[1:3]
my_list[:4]
my_list[3:]
my_list[0:3]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
my_string = "Hello, World!"
print(my_string[7:12])
World
, Wor
World
World!
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you reverse a list my_list using slicing?
my_list[::-1]
my_list[0:-1]
my_list[-1:0]
my_list[1:1:-1]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true about slicing?
Slicing modifies the original list.
Slicing can have a negative step value.
Slicing can only extract elements from start to end.
Slicing requires all three arguments: start, stop, and step.
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
Disney Characters
Quiz
•
Professional Development
20 questions
Customer Service
Quiz
•
Professional Development
10 questions
Food Idioms
Quiz
•
Professional Development
20 questions
NCCER Power Tools Quiz
Quiz
•
Professional Development