Python - Add Set Items - 3

Python - Add Set Items - 3

12th Grade

10 Qs

quiz-placeholder

Similar activities

Sampling Techniques

Sampling Techniques

9th - 12th Grade

11 Qs

Fall Webworm

Fall Webworm

12th Grade

15 Qs

Reducing food related choking

Reducing food related choking

9th Grade - University

15 Qs

Guess the food or drink pt 2

Guess the food or drink pt 2

KG - 12th Grade

7 Qs

Trenton quiz

Trenton quiz

5th - 12th Grade

10 Qs

National 5 Bus Mgt Marketing - MM Place

National 5 Bus Mgt Marketing - MM Place

KG - University

10 Qs

Class12: CS - Ch1 : Python Revision Tour(part1)

Class12: CS - Ch1 : Python Revision Tour(part1)

12th Grade

10 Qs

SOLVING SYSTEMS OF EQUATIONS BY ELIMINATION

SOLVING SYSTEMS OF EQUATIONS BY ELIMINATION

9th - 12th Grade

10 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?