
Python Sets and Dictionaries Quiz
Authored by ankush joshi
Computers
Professional Development
Used 29+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to create a set in Python?
set = {1, 2, 3}
set = [1, 2, 3]
set = (1, 2, 3)
set = <1, 2, 3>
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not allowed in a set?
Integer
String
List
Tuple
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sets in Python are:
Ordered
Mutable
Immutable
Duplicated
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of: len({1, 2, 2, 3})?
2
3
4
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add an element to a set s?
s.append(x)
s.add(x)
s.insert(x)
s.extend(x)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following removes all elements from a set?
s.remove()
s.clear()
del s[]
s.popall()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The method discard() in sets:
Removes the element and throws an error if not found
Removes the element without error if not found
Adds a new element
Sorts the set
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
50 questions
TEST ADMIN J&T Express
Quiz
•
Professional Development
50 questions
Test Mendix 4
Quiz
•
Professional Development
52 questions
MMSCI UD07 y UD08
Quiz
•
Professional Development
46 questions
Was machen Sachen
Quiz
•
Professional Development
47 questions
Latihan CAT PPPK 2022 - Pemadam Kebakaran Pemula
Quiz
•
University - Professi...
55 questions
WP 11-15
Quiz
•
Professional Development
50 questions
Kompetensi Keahlian TKJ
Quiz
•
Professional Development
50 questions
Ujian TIK
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Computers
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
100 questions
Screening Test Customer Service
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
10 questions
Reading a ruler in Inches
Quiz
•
4th Grade - Professio...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development