PYTHON SETS

PYTHON SETS

Professional Development

10 Qs

quiz-placeholder

Similar activities

Conceitos Python

Conceitos Python

Professional Development

10 Qs

Day 2

Day 2

Professional Development

10 Qs

CodeHS - Intro to Python - Conditionals Quiz

CodeHS - Intro to Python - Conditionals Quiz

9th Grade - Professional Development

15 Qs

Python 145

Python 145

4th Grade - Professional Development

11 Qs

Progamação

Progamação

10th Grade - Professional Development

10 Qs

CodeHS 5.1 Python

CodeHS 5.1 Python

9th Grade - Professional Development

15 Qs

Code HS Unit 6 Computer Science in Python

Code HS Unit 6 Computer Science in Python

9th Grade - Professional Development

15 Qs

codePannu  Level 1 Python Course - Week 6 Quiz on Logical Operators

codePannu Level 1 Python Course - Week 6 Quiz on Logical Operators

Professional Development

15 Qs

PYTHON SETS

PYTHON SETS

Assessment

Quiz

Computers

Professional Development

Medium

Created by

RAVINDER B

Used 8+ 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?