del t1 statement will delete the tuple named ‘t1’
1.True
2.False
3.Error
4.None of the above
Posted Date:-2021-12-13 08:43:47
What type of error is shown by following statement? >>>t1 =(1, 2) >>>t2
1. ValueError
2.TypeError
3.NameError
4.None of the above
Posted Date:-2021-12-13 08:44:28
Which of the following is not a tuple?
1. P = 1,2,3,4,5
2.Q = (‘a’, ‘b’, ‘c’)
3. R = (1, 2, 3, 4)
4.None of the above
Posted Date:-2021-12-13 08:32:43
Which of the following is/are features of tuple?
1.Tuple is immutable
2.Tuple is a sequence data type
3.In tuple, elements are enclosed in Parenthesis.
4.All the above
Posted Date:-2021-12-13 08:31:58
Which of the following statement will create an empty tuple?
1.P = ( ) b.
2.Q = tuple( )
3.Both of the above
4.None of the above
Posted Date:-2021-12-13 08:33:18
Write the output of the following:
>>>t1= ('a', 'b')
>>>t2 = (1,2,3)
>>>t2+t11.(‘a’, ‘b’, 1, 2, 3)
2.(1, 2, 3, ‘a’, ‘b’)
3.(1, ‘a’, 2, ‘b’, 3)
4.None of the above
Posted Date:-2021-12-13 08:36:59
Write the output of the following: a=(1, 2, 3, 2, 3, 4, 5) print(min(a) + max(a) + a.count(2))
1.13
2.6
3.8
4.Error
Posted Date:-2021-12-13 08:30:58
Write the output of the following: t1 = (23, 45, 67, 43, 21, 41) print(t1[1:2])
1. (45)
2.(45,)
3.(45, 67)
4.None of the above
Posted Date:-2021-12-13 08:40:44
Write the output of the following. >>> t1=((1,2),(3,4),(9,)) >>>max(t1)
1.9
2.(9,)
3.(3,4)
4.None of the above
Posted Date:-2021-12-13 08:45:31
>>>min(t1) will return an error if the tuple t1 contains value of mixed data type.
1.True
2.False
3.Error
4.None of the above
Posted Date:-2021-12-13 08:45:50
In tuples values are enclosed in __________________
1.a. Square brackets
2.Curly brackets
3.Parenthesis
4.None of the above
Posted Date:-2021-12-13 08:25:56
Tuples are __________________
1.Mutable
2.Immutable
3.Mutable to some extent
4.None of the above
Posted Date:-2021-12-13 08:25:04
What is the length of the given tuple? >>> t1=(1,2,(3,4,5)
1.1
2.2
3.3
4.4
Posted Date:-2021-12-13 08:35:22
What type of error is returned by following code : a=(“Amit”, “Sumit”,”Ashish”,”Sumanta”) print(a.index(“Suman”))
1.SyntaxError
2.ValueError
3.TypeError
4.NameError
Posted Date:-2021-12-13 08:55:04
Which function returns the length of tuple?
1.a. length( )
2.len( )
3.size( )
4.None of the above
Posted Date:-2021-12-13 08:42:12
Which mathematical operator is used to replicate a tuple?
1. Addition
2.Multiplication
3.Exponent
4.Modulus
Posted Date:-2021-12-13 08:40:01
Which of the following function return the frequency of particular element in tuple?
1.index( )
2. max( )
3.count( )
4.None of the above
Posted Date:-2021-12-13 08:47:01
Which of the following function return the frequency of particular element in tuple?
1.index( )
2. max( )
3.count( )
4.None of the above
Posted Date:-2021-12-13 08:47:08
Which of the following function return the frequency of particular element in tuple?
1.index( )
2. max( )
3.count( )
4.None of the above
Posted Date:-2021-12-13 08:47:10
Which of the following is a tuple with single element?
1.t = (1,)
2. t = 1,
3.Both of the above
4.None of the above
Posted Date:-2021-12-13 08:34:03
Which of the following is not a function of tuple?
1.update( )
2.min( )
3.max( )
4.count( )
Posted Date:-2021-12-13 08:29:39
Which of the following statement will return an error. T1 is a tuple.
1.T1 + (23)
2. T1 + [3]
3.Both of the above
4.None of the above
Posted Date:-2021-12-13 08:38:02
Write the output of the following : >>> t1=(1,2,3,4,5,6,7) Write the output of the following: a=(“Amit”, “Sumit”,”Ashish”,”Sumanta”) print(max(a)) >>> t1[t1[1]]
1.Sumanta
2.Ashish
3.Sumit
4.Amit
Posted Date:-2021-12-13 08:54:20
Write the output of the following : >>>t1 = (1,2) >>> t2 = (1.0, 2.0) >>> t1 == t2
1.True
2.False
3.Error
4.None of the above
Posted Date:-2021-12-13 08:43:13
Write the output of the following : >>>t1 = (1,2) >>> t2 = (2,1) >>> t1 == t2
1.True
2.False
3.Error
4.None of the above
Posted Date:-2021-12-13 08:42:45
Write the output of the following :
a=("Amit", "Sumit","Ashish","Sumanta")
for i in a:
print(len(i)**2)1.0 1 4 9
2.16 25 36 49
3.Error
4.1 4 9 16
Posted Date:-2021-12-13 09:15:20
Write the output of the following :
a=("Hello","How","are","you")
for i in a:
print(i,end=" ")1.“Hello” , “How” , “are” , “you”
2. Hello , How , are , you
3. Hello How are you
4.Error
Posted Date:-2021-12-13 09:18:37
Write the output of the following : a=(“Amit”, “Sumit”,”Ashish”,”Sumanta”) print(a.index(“Sumit”)+4//3**2)
1.2
2.4
3.1
4.3
Posted Date:-2021-12-13 08:55:32
Write the output of the following: >>>t = (1) >>>type(t)
1.<class ‘int’>
2.<class ‘float’>
3.<class ‘tuple’>
4.<class ‘list’>
Posted Date:-2021-12-13 08:34:52
Write the output of the following: >>>t1 = (1,2,3,4,5) >>>t2=t1 >>>t2
1.Error
2.(1,2,3,4,5)
3.1,2,3,4,5
4.[1,2,3,4,5]
Posted Date:-2021-12-13 08:36:14
Write the output of the following: A = list(tuple(“Python”)) print(A)
1.(‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’)
2.[‘P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
3.Error
4.None of the above
Posted Date:-2021-12-13 08:28:14
Write the output of the following:
a=("Hello","How","are","you")
for i in a:
print(a.index(i),end=" ")1.0 1 2 3
2.“Hello” , “How” , “are” , “you”
3.Error
4.0 2 3
Posted Date:-2021-12-13 09:19:25
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)1.54
2.93
3.94
4.Error
Posted Date:-2021-12-13 08:30:21
Write the output of the following:
a=(6,8,9,"Sumanta",1)
for i in a:
print(str(i)*2)1.66 88 99 SumantaSumanta 11
2.66 88 99 Error
3.Error
4.66 88 99 SumantaSumanta Error
Posted Date:-2021-12-13 09:16:14
Write the output of the following: a=(“Amit”, “Sumit”,”Ashish”,”Sumanta”) print(a.count(“Sum”))
1.1
2.2
3.0
4.Error
Posted Date:-2021-12-13 09:13:32
Write the output of the following: a=(“Hello”,”How”,”are”,”you”) b=list(a) print(a==b)
1.SyntaxError b. c.
2. ValueError
3.True
4.False
Posted Date:-2021-12-13 09:20:35
Write the output of the following: a="blog" b=list(a) c=tuple(b) print(c)
1.Error b.
2. [‘b’ , ‘l’ , ‘o’ , ‘g’]
3.(‘b’ , ‘l’ , ‘o’ , ‘g’) d. (blog)
4.(blog)
Posted Date:-2021-12-13 09:17:52
Write the output of the following:
t1 = ('1', '2', '3', '4', '5')
print(t1 + tuple("tuple"))1.(‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘t’, ‘u’, ‘p’, ‘l’, ‘e’)
2.(‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘tuple’)
3.Error
4.None of the above
Posted Date:-2021-12-13 08:41:29
Write the output of the following. A = tuple(“Python”) print(A)
1.(python)
2.(“Python”)
3.(‘P’ , ‘y’ , ‘t’ , ‘h’ , ‘o’ , ‘n’)
4.None of the above
Posted Date:-2021-12-13 08:27:15
Write the output of the following. a=(23,34,65,20,5) print(a[0]+a.index(5))
1.28
2.29
3.27
4.26
Posted Date:-2021-12-13 08:28:51