PYTHON SETS

PYTHON SETS

Professional Development

10 Qs

quiz-placeholder

Similar activities

Python List and Tuples

Python List and Tuples

Professional Development

15 Qs

Sequences

Sequences

Professional Development

10 Qs

квиз нг

квиз нг

Professional Development

12 Qs

Python Brain Teaser

Python Brain Teaser

4th Grade - Professional Development

6 Qs

Python-Sem-II

Python-Sem-II

Professional Development

10 Qs

Phyton Lección 2

Phyton Lección 2

Professional Development

13 Qs

BOP-1

BOP-1

University - Professional Development

15 Qs

PYTHON QUIZ2

PYTHON QUIZ2

University - Professional Development

10 Qs

PYTHON SETS

PYTHON SETS

Assessment

Quiz

Computers

Professional Development

Medium

Created by

RAVINDER B

Used 7+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following are true for objects of Python’s set type

The order of elements in a set is significant.

A set may contain elements that are mutable.

A given element can’t appear in a set more than once.

Sets are mutable.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not the correct syntax for creating a set?

set([[1,2],[3,4]])

set([1,2,2,3,4])

set((1,2,3,4))

{1,2,3,4}

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following statements is used to create an empty set?

{}

set()

[]

()

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If a={5,6,7,8}, which of the following statements is false?

print(len(a))

print(min(a))

a.remove(5)

a[2]=45

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these about a frozenset is not true?

Mutable data type

Allows duplicate values

Data type with unordered values

Immutable data type

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

print(t[3])

t[3] = 45

print(max(t))

print(len(t))

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

t = (1, 2)

print(2*t)

(1, 2, 1, 2)

[1, 2, 1, 2]

(1, 1, 2, 2)

[1, 1, 2, 2]

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?