Pyton lists - del() - error index

Pyton lists - del() - error index

4th - 12th Grade

6 Qs

quiz-placeholder

Similar activities

Tell me

Tell me

4th Grade

11 Qs

Term3-PC7.1-Describe a data structure

Term3-PC7.1-Describe a data structure

9th Grade

7 Qs

Class 5 Tables in Word

Class 5 Tables in Word

5th Grade

10 Qs

Makey Makey Lesson 2

Makey Makey Lesson 2

8th Grade

5 Qs

Windows and Office 2016

Windows and Office 2016

9th - 12th Grade

10 Qs

POST TEST BASIS DATA KELAS 11

POST TEST BASIS DATA KELAS 11

11th Grade

10 Qs

Symbols & Num. Keypad

Symbols & Num. Keypad

1st - 12th Grade

10 Qs

Powerpoint Presentation

Powerpoint Presentation

5th - 6th Grade

10 Qs

Pyton lists - del() - error index

Pyton lists - del() - error index

Assessment

Quiz

Computers

4th - 12th Grade

Medium

Created by

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

Media Image

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]