Table of Contents
Understanding Python Tuples: A Beginner's Guide to Immutable Sequences
🔒 Please log in to unlock this course.
MCQ Section
MCQ 1
Tuples are __________________
Locked. Enroll to open this MCQ.
MCQ 2
Tuples can contain elements of any data type.(T/F)
Locked. Enroll to open this MCQ.
MCQ 3
In tuples values are enclosed in ______________
Locked. Enroll to open this MCQ.
MCQ 4
Write the output of the following. A = tuple("Python") print(A)
Locked. Enroll to open this MCQ.
MCQ 5
len( ) function returns the number of elements in tuple.(T/F)
Locked. Enroll to open this MCQ.
MCQ 6
Write the output of the following: A = list(tuple("Python")) print(A)
Locked. Enroll to open this MCQ.
MCQ 7
Write the output of the following. a=(23,34,65,20,5) print(a[0]+a.index(5))
Locked. Enroll to open this MCQ.
MCQ 8
Which of the following is not a function of tuple?
Locked. Enroll to open this MCQ.
MCQ 9
Write the output of the following: a=(23,34,65,20,5) s=0 for i in a: if i%2==0: s=s+a[i] print(s)
Locked. Enroll to open this MCQ.
MCQ 10
Write the output of the following: a=(1, 2, 3, 2, 3, 4, 5) print(min(a) + max(a) + a.count(2))
Locked. Enroll to open this MCQ.
MCQ 11
Which of the following is/are features of tuple?
Locked. Enroll to open this MCQ.
MCQ 12
Which of the following is not a tuple?
Locked. Enroll to open this MCQ.
MCQ 13
Which of the following statement will create an empty tuple?
Locked. Enroll to open this MCQ.
MCQ 14
Which of the following is a tuple with single element?
Locked. Enroll to open this MCQ.
MCQ 15
Write the output of the following: t = (1) type(t)
Locked. Enroll to open this MCQ.
MCQ 16
What is the length of the given tuple? t1=(1,2,(3,4,5))
Locked. Enroll to open this MCQ.
MCQ 17
Write the output of the following: t1 = (1,2,3,4,5) t2=t1 t2
Locked. Enroll to open this MCQ.
MCQ 18
Write the output of the following: t1 = ('a', 'b') t2 = (1,2,3) t2 + t1
Locked. Enroll to open this MCQ.
MCQ 19
Which of the following statement will return an error. T1 is a tuple.
Locked. Enroll to open this MCQ.
MCQ 20
Which mathematical operator is used to replicate a tuple?
Locked. Enroll to open this MCQ.
MCQ 21
Write the output of the following: t1 = (23, 45, 67, 43, 21, 41) print(t1[1:2])
Locked. Enroll to open this MCQ.
MCQ 22
Write the output of the following: t1 = ('1', '2', '3', '4', '5') print(t1 + tuple("tuple"))
Locked. Enroll to open this MCQ.
MCQ 23
Which function returns the length of tuple?
Locked. Enroll to open this MCQ.
MCQ 24
Write the output of the following : t1 = (1,2) t2 = (2,1) t1 == t2
Locked. Enroll to open this MCQ.
MCQ 25
Write the output of the following : t1 = (1,2) t2 = (1.0, 2.0) t1 == t2
Locked. Enroll to open this MCQ.
MCQ 26
del t1 statement will delete the tuple named 't1'.(T/F)
Locked. Enroll to open this MCQ.
MCQ 27
What type of error is shown by following statement? t1 =(1, 2) t2
Locked. Enroll to open this MCQ.
MCQ 28
Write the output of the following. t1=((1,2),(3,4),(9,)) max(t1)
Locked. Enroll to open this MCQ.
MCQ 29
>>>min(t1) will return an error if the tuple t1 contains value of mixed data type.(T/F)
Locked. Enroll to open this MCQ.
MCQ 30
Which of the following function return the frequency of particular element in tuple?
Locked. Enroll to open this MCQ.
MCQ 31
Write the output of the following : t1 = (1,2,3,4,5,6,7) t1[t1[1]]
Locked. Enroll to open this MCQ.
MCQ 32
Write the output of the following : t1=(1,2,3,4,5,6,7) t1[t1[1]] + t1[t1[-4]]
Locked. Enroll to open this MCQ.
MCQ 33
Write the output of : >>> tuple(
Locked. Enroll to open this MCQ.
MCQ 34
Write the output of : >>> sorted(tuple("Amit"))
Locked. Enroll to open this MCQ.
MCQ 35
Which of the following statement create tuple?
Locked. Enroll to open this MCQ.
MCQ 36
Which of the following operation work on tuples?
Locked. Enroll to open this MCQ.
MCQ 37
Write the output of the following: (n1,n2)=tuple("25") n2+n1
Locked. Enroll to open this MCQ.
MCQ 38
What is the length of given tuple? t = ((((1,2,3,4), 'a', 'b'),'g', 1, 3), "Sonu") len(t)
Locked. Enroll to open this MCQ.
MCQ 39
Write the output of the following: t1 = ((101,"Amit",98),(102,"Geetu",95),(103,"Manoj",87),(104,"Saw…
Locked. Enroll to open this MCQ.
MCQ 40
Which function takes tuple as argument?
Locked. Enroll to open this MCQ.
MCQ 41
Write the output of the following: a=("Amit", "Sumit","Ashish","Sumanta") print(max(a))
Locked. Enroll to open this MCQ.
MCQ 42
What type of error is returned by following code : a=("Amit", "Sumit","Ashish","Sumanta")…
Locked. Enroll to open this MCQ.
MCQ 43
Write the output of the following : a=("Amit", "Sumit","Ashish","Sumanta")…
Locked. Enroll to open this MCQ.
MCQ 44
Write the output of the following: a=("Amit", "Sumit","Ashish","Sumanta") print(a.count("Sum"))
Locked. Enroll to open this MCQ.
MCQ 45
Write the output of the following : a=("Amit", "Sumit","Ashish","Sumanta") for i in a:…
Locked. Enroll to open this MCQ.
MCQ 46
Write the output of the following: a=(6,8,9,"Rumman",1) for i in a: print(str(i)*2, end=" ")
Locked. Enroll to open this MCQ.
MCQ 47
Write the output of the following: a="atnyla" b=list(a) c=tuple(b) print(c)
Locked. Enroll to open this MCQ.
MCQ 48
Write the output of the following : a=("Hello","How","are","you") for i in a: print(i,end=" ")
Locked. Enroll to open this MCQ.
MCQ 49
Write the output of the following: a=("Hello","How","are","you") for i in a: print(a.index(i),end="…
Locked. Enroll to open this MCQ.
MCQ 50
Write the output of the following: a=("Hello","How","are","you") b=list(a) print(a==b)
Locked. Enroll to open this MCQ.
MCQ 51
Write the output of the following: a=("Amita", "How", "are", "you", "a") for i in range(len(a)):…
Locked. Enroll to open this MCQ.
MCQ 52
What is the output of the following aTuple = (10, 20, 30, 40, 50, 60, 70, 80) print(aTuple[2:5],…
Locked. Enroll to open this MCQ.
MCQ 53
What is the output of the following code aTuple = (100, 200, 300, 400, 500) print(aTuple[-2])…
Locked. Enroll to open this MCQ.
MCQ 54
What is the output of the following tuple1 = (1120, 'a') print(max(tuple1))
Locked. Enroll to open this MCQ.
MCQ 55
Choose the correct way to access value 20 from the following tuple aTuple = ("Orange", [10, 20,…
Locked. Enroll to open this MCQ.
MCQ 56
What is the type of the following variable aTuple = ("Orange") print(type(aTuple))
Locked. Enroll to open this MCQ.
MCQ 57
What is the output of the following tuple operation aTuple = (100,) print(aTuple * 2)
Locked. Enroll to open this MCQ.
MCQ 58
What is the output of the following code aTuple = (100, 200, 300, 400, 500) aTuple[1] = 800…
Locked. Enroll to open this MCQ.
MCQ 59
Select true statements regarding the Python tuple
Locked. Enroll to open this MCQ.
MCQ 60
What is the output of the following aTuple = "Yellow", 20, "Red" a, b, c = aTuple print(a)
Locked. Enroll to open this MCQ.
MCQ 61
A Python tuple can also be created without using parentheses
Locked. Enroll to open this MCQ.
MCQ 62
What is the output of the following tuple operation aTuple = (100, 200, 300, 400, 500)…
Locked. Enroll to open this MCQ.
MCQ 63
Select which is true for Python tuple
Locked. Enroll to open this MCQ.
MCQ 64
What will be the output after the following statements? a = min(10, 15, 6, 17, 24) print(a)
Locked. Enroll to open this MCQ.
MCQ 65
What will be the output after the following statements? x = (0, 2, 4, 6) print(list(x))
Locked. Enroll to open this MCQ.
Get Python Programming Language updates by email
Short, practical lessons and course updates from Rumman Ansari. No spam.