Set 1

Set 1

12th Grade

10 Qs

quiz-placeholder

Similar activities

Quiz

Quiz

9th - 12th Grade

10 Qs

Food

Food

11th - 12th Grade

15 Qs

Fun with Food

Fun with Food

1st Grade - University

10 Qs

Royale High Quiz

Royale High Quiz

1st Grade - University

15 Qs

Python - Loop Sets - 5

Python - Loop Sets - 5

12th Grade

10 Qs

How well do you know your fruits?

How well do you know your fruits?

KG - Professional Development

13 Qs

List 1

List 1

12th Grade

9 Qs

Gatorade Flavors

Gatorade Flavors

10th - 12th Grade

14 Qs

Set 1

Set 1

Assessment

Quiz

Other

12th Grade

Easy

Created by

Amy Austin

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type is used in Python to store multiple items in a single variable, which is unordered, unchangeable, and unindexed?

List

Tuple

Set

Dictionary

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to add an item to a set in Python?

append()

add()

push()

insert()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following set operation: {'apple', 'banana', 'cherry', 'apple'}?

{'apple', 'banana', 'cherry'}

Error

{'apple', 'banana', 'cherry', 'apple'}

{'banana', 'cherry'}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python sets, what is considered the same value?

1 and 0

None and False

True and False

True and 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you determine the number of items in a set?

length()

len()

size()

count()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a correct way to create a set?

set(('apple', 'banana', 'cherry'))

{'apple', 'banana', 'cherry'}

set['apple', 'banana', 'cherry']

set('apple', 'banana', 'cherry')

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which collection type in Python is ordered and changeable, and allows duplicate members?

Set

Tuple

List

Dictionary

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?