Quiz on Python Sets
FREE Online Courses: Click for Success, Learn for Free - Start Now!
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
- Which of the following is not true about the set?
CorrectIncorrect -
Question 2 of 15
2. Question
- Which of the following is a correct way to declare an empty set?
CorrectIncorrect -
Question 3 of 15
3. Question
- Which of the following is the extra property of frozen set?
CorrectIncorrect -
Question 4 of 15
4. Question
Find the output of the following code?
set1={4,’v’,6.9,4.0,’e’}
set1CorrectIncorrect -
Question 5 of 15
5. Question
- Which of the following can be the elements of a set?
CorrectIncorrect -
Question 6 of 15
6. Question
Find the output of the following code?
{1,2,3,4}=={1,4,3,2}
{1,2,3,4}>{1,2,3,’4′}CorrectIncorrect -
Question 7 of 15
7. Question
- Choose the correct way to add elements to a set using update() method.
CorrectIncorrect -
Question 8 of 15
8. Question
- Which of the following cannot be used for deleting values of sets?
CorrectIncorrect -
Question 9 of 15
9. Question
Find the output of the following code?
set1={3.5,’g’,6,3}
set2={‘h’,4,3,’y’}
set1.symmetric_difference(set2)CorrectIncorrect -
Question 10 of 15
10. Question
Find the output of the following code?
set1={1,-5,3,0}
print(set1.remove(‘5’))CorrectIncorrect -
Question 11 of 15
11. Question
Which of the following codes give the output as False if
set1={1,2,3,4}, set2={3,4.0,’2′}?
CorrectIncorrect -
Question 12 of 15
12. Question
set1={1,2,3,4,3}
set2={4,2,7,6}
set1.update(set2)
len(set1)CorrectIncorrect -
Question 13 of 15
13. Question
Which of the following code blocks give an error on execution, if
set2={‘e’,’a’,’t’},set1={‘a’,’b’,’c’}?
CorrectIncorrect -
Question 14 of 15
14. Question
Find the output of the following code?
set1={1,0.2,3.4,9}
set2={4.2,6.3}
print(set1+set2)CorrectIncorrect -
Question 15 of 15
15. Question
Find the output of the following code?
set1={‘a’,’o’,’e’,’u’,’i’}
enm=enumerate(set1)
enm=enumerate(set1)
print(set(enm))CorrectIncorrect