Python Quiz: Lists, Dicts, Sets, and More

Python Quiz: Lists, Dicts, Sets, and More

2nd Grade

50 Qs

quiz-placeholder

Similar activities

IT Fundamentals Test Part 1

IT Fundamentals Test Part 1

KG - University

49 Qs

Máy tính - Người bạn mới của em

Máy tính - Người bạn mới của em

2nd Grade - University

50 Qs

Gambar Manufaktur

Gambar Manufaktur

1st - 2nd Grade

50 Qs

Układy cyfrowe

Układy cyfrowe

1st - 5th Grade

45 Qs

Parts of computer

Parts of computer

KG - 2nd Grade

51 Qs

İç Donanım Birimleri

İç Donanım Birimleri

1st - 2nd Grade

50 Qs

Keyboard

Keyboard

2nd Grade

55 Qs

ÔN TẬP MÔN TIN HỌC LỚP 4 HỌC KÌ 2

ÔN TẬP MÔN TIN HỌC LỚP 4 HỌC KÌ 2

1st - 5th Grade

48 Qs

Python Quiz: Lists, Dicts, Sets, and More

Python Quiz: Lists, Dicts, Sets, and More

Assessment

Quiz

Computers

2nd Grade

Practice Problem

Hard

Created by

Beebi Naseeba

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print([1, 2, 3] + [4, 5, 6])?

[1, 2, 3, 4, 5, 6]

[5, 7, 9]

[4, 5, 6, 1, 2, 3]

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does list1.append(5) do?

Adds 5 to the end of list1

Inserts 5 at index 0

Deletes index 5

Raises an error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(len([1, [2, 3], 4]))?

3

4

5

2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove an element from a list by value?

list.remove(value)

list.delete(value)

list.pop(value)

del list[value]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of list1 = [1, 2, 3] and list1 * 2?

[1, 2, 3, 1, 2, 3]

[1, 2, 3, 2]

[1, 2, 3, 1]

[2, 4, 6]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of dict1 = {'a':1, 'b':2}; print(dict1['a'])?

'a'

1

2

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you get all the keys of a dictionary?

dict.keys()

dict.values()

dict.items()

dict.get()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?