PythonTupeDicSet
Quiz
•
Professional Development
•
1st - 3rd Grade
•
Practice Problem
•
Hard
Viết Phan
Used 3+ times
FREE Resource
Enhance your content in a minute
17 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Select all which is true for Python set
Sets are unordered
set object does support indexing
set doesn’t allow duplicate
sets are written with curly brackets {}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following set operation
set1 = {"Yellow", "Orange", "Black"}
set2 = {"Orange", "Blue", "Pink"}
set3 = set2.difference(set1)
print(set3)
{‘Yellow’, 'Black', ‘Pink’, ‘Blue’}
{‘Pink’, ‘Blue’}
{‘Yellow’, 'Black'}
{‘Yellow’, ‘Blue’}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following set operation
{‘Yellow’, ‘Orange’, ‘Black’, [“Blue”, “Green”, “Red”]}
TypeError: update() doesn’t allow list as a argument.
[‘Yellow’, ‘Orange’, ‘Red’, ‘Black’, ‘Green’, ‘Blue’]
{‘Yellow’, ‘Orange’, ‘Red’, ‘Black’, ‘Green’, ‘Blue’}
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
sampleSet = {"Yellow", "Orange", "Black"}
sampleSet.add("Blue")
sampleSet.add("Orange")
print(sampleSet)
{‘Blue’, ‘Orange’, ‘Yellow’, ‘Orange’, ‘Black’}
{"Yellow", "Orange", "Black","Blue", "Orange"}
{‘Blue’, ‘Orange’, ‘Yellow’, ‘Black’}
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code
Yellow
Orange
Syntax Error
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following
KeyError: ‘Blue’
TypeError
{‘Yellow’, ‘Orange’, ‘Black’}
[‘Yellow’, ‘Orange’, ‘Black’]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code
TypeError
{‘PYnative’, 1, (‘abc’, ‘xyz’), True}
{‘PYnative’, 1, ‘abc’, ‘xyz’, True}
{‘PYnative’, 1, (‘abc’, ‘xyz’)}
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
Already have an account?
Similar Resources on Wayground
20 questions
Hubs and Switches
Quiz
•
1st - 3rd Grade
20 questions
Soal JFA
Quiz
•
1st Grade
20 questions
REVISION 4 : TOPIC 3, 4, 5 & 7
Quiz
•
1st Grade - University
20 questions
Grammar Evaluation
Quiz
•
2nd Grade
20 questions
SISTEM INFORMASI LOGISTIK - Logistic - JAN 2023
Quiz
•
1st Grade
13 questions
Training Internal Audit ISO 9001:2015 & ISO 45001:2018
Quiz
•
1st - 10th Grade
12 questions
Continua 3 semana _marzo 2021_
Quiz
•
1st - 3rd Grade
20 questions
Kiểm tra Công Nghệ
Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Professional Development
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
10 questions
Area
Quiz
•
3rd Grade
8 questions
Ancient China Quick Check
Quiz
•
3rd Grade
14 questions
States of Matter
Lesson
•
KG - 3rd Grade
13 questions
Veterans' Day
Quiz
•
1st - 3rd Grade
17 questions
Multiplication facts
Quiz
•
3rd Grade
10 questions
Veterans Day
Quiz
•
3rd Grade
