
Python Programming - Unit I Quiz
Authored by Sakthi Kumaresh
others
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Comments in Python can be written using //.
True
False
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to count the number of times a value appears in a tuple?
a) count()
b) index()
c) sum()
d) len()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code return? t = (1, 2, 3) t[0] = 10
a) (10, 2, 3)
b) (1, 2, 3)
c) Error
d) None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an empty tuple?
a) ()
b) []
c) {}
d) None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You can convert a list to a tuple using the function _______().
tuple
list
set
Dictionary
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code? a = {1, 2, 3} b = {3, 4, 5} print(a & b)
a) {1, 2}
b) {3}
c) {1, 2, 3, 4, 5}
d) {}
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? a = {1, 2, 3, 4} b = {3, 4, 5, 6} print(a - b)
a) {3, 4}
b) {1, 2}
c) {5, 6}
d) {1, 2, 5, 6}
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?