Unit-II-Python 2024 batch-list examples

Unit-II-Python 2024 batch-list examples

University

8 Qs

quiz-placeholder

Similar activities

Python Quiz- 1.9

Python Quiz- 1.9

University

12 Qs

Python list starter

Python list starter

10th Grade - University

12 Qs

Python Day 8

Python Day 8

University

7 Qs

Python lists

Python lists

9th Grade - Professional Development

7 Qs

PSP Week 5

PSP Week 5

University

10 Qs

Quiz3

Quiz3

University

12 Qs

Python

Python

University

10 Qs

special

special

University

10 Qs

Unit-II-Python 2024 batch-list examples

Unit-II-Python 2024 batch-list examples

Assessment

Quiz

Computers

University

Medium

Created by

Ajitha Padmanabhan

Used 1+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would be the range of index values for a list of 10 elements?

0–9

0–10

1–10

none of the mentioned

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which one of the following is NOT a common operation on lists?

delete

replace

interleave

append

insert

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following would be the resulting list after inserting the value 50 at index 2?

Media Image
Media Image
Media Image

none of the mentioned

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you create an empty list in Python?

my_list = ()

my_list = {}

my_list = []

my_list = ()[]

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which method adds an element to the end of a list?

insert()

append()


add()

extend()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

my_list = [1, 2, 3, 4, 5]

print(my_list[2])

1

2

3

4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you delete the element 30 from the list my_list = [10, 20, 30, 40, 50]?

my_list.remove(30)

my_list.delete(30)

my_list.pop(30)

my_list.erase(30)

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will correctly retrieve the last element of the list my_list = [10, 20, 30, 40, 50]?

my_list[-1]

my_list[len(my_list)]

my_list[-0]

my_list[5]