Python - Add Set Items - 3

Python - Add Set Items - 3

12th Grade

10 Qs

quiz-placeholder

Similar activities

Asexual Plant Propagation

Asexual Plant Propagation

12th Grade

14 Qs

Furries!

Furries!

KG - Professional Development

10 Qs

Holiday vocabulary

Holiday vocabulary

1st - 12th Grade

13 Qs

Minecraft

Minecraft

KG - Professional Development

10 Qs

JS 1

JS 1

12th Grade

15 Qs

Nrl Origin

Nrl Origin

5th - 12th Grade

10 Qs

Fruits / Frutas

Fruits / Frutas

KG - 12th Grade

12 Qs

How well do you know your fruits?

How well do you know your fruits?

KG - Professional Development

13 Qs

Python - Add Set Items - 3

Python - Add Set Items - 3

Assessment

Quiz

Other

12th Grade

Medium

Created by

Amy Austin

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you add an item to a set in Python?

thisset.push('orange')

thisset.add('orange')

thisset.append('orange')

thisset.insert('orange')

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to add items from another set into the current set?

merge()

join()

update()

concat()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of object can be added to a set using the update() method?

Only sets

Only lists

Any iterable object

Only dictionaries

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid Python data type?

Sets

Lists

Tuples

Arrays

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to remove an item from a set?

thisset.remove('apple')

thisset.delete('apple')

thisset.pop('apple')

thisset.erase('apple')

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you loop through the items of a set?

Using a for loop

Using the loop() method

Using the iterate() method

Sets cannot be looped through

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to join two sets?

update()

join()

merge()

concat()

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?