Indexing & Slicing
Quiz
•
Information Technology (IT)
•
Professional Development
•
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
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
10 questions
How to Email your Teacher
Quiz
•
Professional Development
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
20 questions
Context Clues: Multiple Meaning Words
Quiz
•
Professional Development
18 questions
Do or Does
Quiz
•
Professional Development
31 questions
Servsafe Food Manager Practice Test 2021- Part 1
Quiz
•
9th Grade - Professio...