
PYTHON SETS

Quiz
•
Computers
•
Professional Development
•
Medium
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
Similar Resources on Wayground
13 questions
Phyton Lección 2

Quiz
•
Professional Development
14 questions
ABREDES - Devasc Python

Quiz
•
Professional Development
12 questions
Week 1

Quiz
•
Professional Development
10 questions
Perform Word Processing

Quiz
•
Professional Development
10 questions
Python Collections

Quiz
•
Professional Development
12 questions
Python5

Quiz
•
Professional Development
12 questions
квиз нг

Quiz
•
Professional Development
12 questions
PREP 2023 CS Primer Review 1

Quiz
•
Professional Development
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade