
Python-Day-3
Authored by Uday Sk
Computers
12th Grade - University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this?
s = {1,9,3,4,5,5,4}
print(s)
1 3 5 9
1 3 5 4 9
1 3 4 5 9
1 3 4 5
9
Answer explanation
set is a data type that stores elements in ascending order and duplicates are not allowed.
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following statements is used to create an empty set?
{ }
[]
set()
()
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
>>> a={5,4}
>>> b={1,2,4,5}
>>> a<b
what will the output?
{1,2}
false
True
False
Answer explanation
Explanation:
a<b returns True if a is a proper subset of b.
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
>>> a={5,6,7,8}
>>> b={7,5,6,8}
>>> a==b
what will be the output?
True
False
NOTA
Answer explanation
It is possible to compare sets
5.
MULTIPLE SELECT QUESTION
45 sec • 5 pts
Which of the following is not a declaration of the dictionary?
{1: ‘A’, 2: ‘B’}
{ }
dict([[1,”A”],[2,”B”]])
{1,”A”,2”B”}
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
A
4
Error
NONE
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
a={1:5,2:3,3:4}
a.pop(3)
print(a)
{1: 5}
{1: 5, 3: 4}
Error
{1: 5, 2: 3}
Answer explanation
: pop() method removes the key-value pair for the key mentioned in the pop() method.
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
15 questions
UAS Desain Media Interaktif
Quiz
•
12th Grade
10 questions
C++ Array Quiz
Quiz
•
University
17 questions
Đề ôn tập cuối HKI lớp 5
Quiz
•
6th Grade - University
14 questions
Оформлення текстових документів
Quiz
•
12th Grade
10 questions
Software Testing
Quiz
•
University
20 questions
ĐC CNTT_Chương 1
Quiz
•
University
20 questions
C Programming Unit-1 Test-2
Quiz
•
University
10 questions
Hệ Điều Hành Của Máy Tính
Quiz
•
10th Grade - University
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade