
PYTHON SETS

Quiz
•
Computers
•
Professional Development
•
Medium
RAVINDER B
Used 8+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following are true for objects of Python’s set type
The order of elements in a set is significant.
A set may contain elements that are mutable.
A given element can’t appear in a set more than once.
Sets are mutable.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is not the correct syntax for creating a set?
set([[1,2],[3,4]])
set([1,2,2,3,4])
set((1,2,3,4))
{1,2,3,4}
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements is used to create an empty set?
{}
set()
[]
()
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If a={5,6,7,8}, which of the following statements is false?
print(len(a))
print(min(a))
a.remove(5)
a[2]=45
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of these about a frozenset is not true?
Mutable data type
Allows duplicate values
Data type with unordered values
Immutable data type
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
print(t[3])
t[3] = 45
print(max(t))
print(len(t))
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
t = (1, 2)
print(2*t)
(1, 2, 1, 2)
[1, 2, 1, 2]
(1, 1, 2, 2)
[1, 1, 2, 2]
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Perform Word Processing

Quiz
•
Professional Development
15 questions
Python Class 1

Quiz
•
Professional Development
12 questions
Sets and dictionaries

Quiz
•
Professional Development
10 questions
Avaliação Pensamento Computacional - Prático

Quiz
•
1st Grade - Professio...
10 questions
. Python бағдарламалау тілі

Quiz
•
Professional Development
15 questions
Python6

Quiz
•
Professional Development
15 questions
minecraft bedwars

Quiz
•
KG - Professional Dev...
8 questions
Flutter_Q1 G4

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade