Python Set
Quiz
•
Other
•
University
•
Hard
Gokul Chinnathurai
Used 103+ times
FREE Resource
Enhance your content in a minute
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these about a set is not true?
Mutable data type
Allows duplicate values
Data type with unordered values
Immutable data type
2.
MULTIPLE CHOICE QUESTION
30 sec • 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
30 sec • 1 pt
What will be the output of the following Python code?
nums = set([1,1,2,3,3,3,4,4])
print(len(nums))
7
Error, invalid syntax for formation of set
4
8
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
a = [5,5,6,7,7,7]
b = set(a)
def test(lst):
if lst in b:
return 1
else:
return 0
for i in filter(test, a):
print(i,end=" ")
5 5 6
5 6 7
5 5 6 7 7 7
5 6 7 7 7
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is used to create an empty set?
{ }
set()
[ ]
( )
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>> a={5,4}
>>> b={1,2,4,5}
>>> a<b
{1,2}
True
False
Invalid operation
7.
MULTIPLE CHOICE QUESTION
30 sec • 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
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
40 questions
World Knowledge
Quiz
•
12th Grade - University
35 questions
UAS Genap Bahasa Indonesia - XI
Quiz
•
University
40 questions
UTS Jiwa 1_3ABC_Rabu, 27 Okt,21
Quiz
•
University
37 questions
Ulangan harian 1
Quiz
•
12th Grade - University
40 questions
ASAS SMKP ALFABIR 2425 ATK XI
Quiz
•
11th Grade - University
36 questions
LearnTube Digital Marketing Quiz 17/3/23
Quiz
•
University
40 questions
UJIAN MID BOGA DASAR
Quiz
•
10th Grade - University
44 questions
Tuần 4_T6_Học kiến thức hàng tuần cùng Quizizz
Quiz
•
University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Other
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
