Search Header Logo

Python - Set Methods - 7

Authored by Amy Austin

Other

12th Grade

Python - Set Methods - 7
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method adds an element to the set?

push()

append()

insert()

add()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method removes all the elements from the set?

clear()

removeAll()

delete()

empty()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns a set containing the difference between two or more sets?

difference()

diff()

minus()

subtract()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns a set that is the intersection of two other sets?

intersect()

intersection()

join()

cross()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method removes the specified item from the set?

remove()

delete()

discard()

erase()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns whether two sets have an intersection or not?

isdisjoint()

hasIntersection()

crosses()

intersects()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns whether another set contains this set or not?

isContained()

issubset()

contains()

isInside()

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?