Python-Day-3

Quiz
•
Computers
•
12th Grade - University
•
Medium
Uday Sk
Used 1+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Conditionals Quiz

Quiz
•
9th - 12th Grade
10 questions
Cấu trúc lặp - Python

Quiz
•
9th - 12th Grade
20 questions
Unit 5 TEST

Quiz
•
11th - 12th Grade
15 questions
Unit 4 Conditionals Assignment

Quiz
•
11th - 12th Grade
12 questions
Python Operators

Quiz
•
12th Grade
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
10 questions
Python - Functions

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade