
Pyton lists - del() - error index
Quiz
•
Computers
•
4th - 12th Grade
•
Medium
Larbi Yazid
Used 19+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
fruits = ["apple", "banana", "cherry"]
Choose the correct instruction to delete "banana"
fruits[1].delete()
fruits[1].delete
delete fruits[1]
del fruits[1]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
numbers = [7,4,9,6,5,2,1]
Which of the following is the correct instruction to delete 9 ?
del numbers[2]
del numbers[3]
del numbers[9]
del numbers[-4]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
See the code and the output in the image.
What is the missing statement in the red box?
del banana
del thislist[1]
del thislist[2]
delete thislist[1]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
subjects = ["Computer", "Math", "English"]
Which of the following generates an index error?
subjects[0]
subjects[-1]
subjects[3]
subjects[-3]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
numbers = [6,3,9,8,2,1]
Which of the following will generate an index error?
numbers[9]
numbers[1]
numbers[-6]
numbers[5]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
results = [98.5 , 99.2 , 92.7 , 97.4]
Which of the following will NOT generate an index error?
results[3]
results[4]
results[5]
results[-5]
Similar Resources on Wayground
10 questions
MICROSOFT WORD
Quiz
•
5th Grade
11 questions
Scratch
Quiz
•
4th Grade
10 questions
Informatika
Quiz
•
12th Grade
10 questions
Problem Solving using Python and R - UNIT II - List
Quiz
•
12th Grade
10 questions
Types of Keyboards and Keys
Quiz
•
1st - 4th Grade
10 questions
ULANGAN FOLDER DAN FILE_RnA
Quiz
•
9th Grade
10 questions
Malware - BP
Quiz
•
7th Grade
10 questions
Строковые величины
Quiz
•
9th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
25 questions
Exploring POV and Unreliable Narrators
Quiz
•
7th Grade
18 questions
Company Logos
Quiz
•
6th - 8th Grade
30 questions
Computer Terminology Exercise #1 ( Fill Ins)
Quiz
•
9th Grade
15 questions
MLA Formatting
Quiz
•
9th Grade
20 questions
Typing Practice
Quiz
•
7th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro
Lesson
•
5th - 9th Grade
16 questions
4.2 Private & Personal Information
Lesson
•
4th Grade