Python

Python

University

10 Qs

quiz-placeholder

Similar activities

Python Programming

Python Programming

5th Grade - University

15 Qs

Python End of Topic Quiz

Python End of Topic Quiz

8th Grade - University

15 Qs

Lists review (Python)

Lists review (Python)

University

10 Qs

04 - Python - Lists

04 - Python - Lists

University - Professional Development

10 Qs

2-列表与元组

2-列表与元组

University

10 Qs

Python List

Python List

University

10 Qs

Python Basics

Python Basics

University

15 Qs

CodeHS Basic Data Structures in Python

CodeHS Basic Data Structures in Python

9th Grade - University

10 Qs

Python

Python

Assessment

Quiz

Computers

University

Hard

Created by

NANCY P

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

append() is used to add new elements at which position in a list?

begin

middle

end

None

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Lists are mutable

Yes

No

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

my_list = ["hello", "world", "hi", "bye"]

What will be the output of

print(my_list[-1])?

"hello"

"world"

"hi"

"bye"

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following list function?

sampleList = [10, 20, 30, 40, 50]

sampleList.pop()

print(sampleList)


sampleList.pop(2)

print(sampleList)

[20, 30, 40, 50]

[10, 20, 40]

[10, 20, 30, 40]

[10, 20, 30, 50]

[10, 20, 30, 40]

[10, 20, 40]

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following list assignment?

aList = [4, 8, 12, 16]

aList[1:4] = [20, 24, 28]

print(aList)

[4, 20, 24, 28, 8, 12, 16]

[4, 20, 24, 28]

[4,8,12,16,20,24,28]

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code?

list1 = ['xyz', 'zara', 'PYnative']

print (max(list1))

PYnative

zara

xyz

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following?

aList = [5, 10, 15, 25]

print(aList[::-2])

[15, 10, 5]

[10, 5]

[25, 10]

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?