Unit-II-Python 2024 batch-list examples

Unit-II-Python 2024 batch-list examples

University

8 Qs

quiz-placeholder

Similar activities

CSE 6R Midterm Review

CSE 6R Midterm Review

University

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Data Structures

Data Structures

University

12 Qs

5th Grade Tech Review

5th Grade Tech Review

KG - University

7 Qs

Python

Python

University

10 Qs

Python Round 2

Python Round 2

University

10 Qs

TIU Quiz-9

TIU Quiz-9

University

10 Qs

Java Programming

Java Programming

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]