
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
Programación y robótica educativa (VoF)
Quiz
•
Professional Development
55 questions
Robotic Process Automation-Evolve
Quiz
•
Professional Development
48 questions
Software Development Practices Quiz
Quiz
•
Professional Development
54 questions
Google teacher N2 practice
Quiz
•
Professional Development
50 questions
BIG DATA PC
Quiz
•
Professional Development
45 questions
SAFe 6 Agilist Part 4
Quiz
•
Professional Development
49 questions
IT alapismeretek
Quiz
•
10th Grade - Professi...
52 questions
PROTOCOLOS-1-ESPAÑOL
Quiz
•
University - Professi...
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