Tuple in Python Quiz 4

Share with others

Welcome to your Tuple in Python Quiz 4

Q31. Write the output of the following:

t1 = (23, 45, 67, 43, 21, 41)

print(t1[1:2])

Q32. Write the output of the following:

t1 = ('1', '2', '3', '4', '5')

print(t1 + tuple("tuple"))

Q33. Which function returns the length of tuple?

Q34. Write the output of the following :

>>>t1 = (1,2)

>>> t2 = (2,1)

>>> t1 == t2

Q35. Write the output of the following :

>>>t1 = (1,2)

>>> t2 = (1.0, 2.0)

>>> t1 == t2

Q36. del t1 statement will delete the tuple named 't1'

Q37. What type of error is shown by following statement?

>>>t1 =(1, 2)

>>>t2

Q38. Write the output of the following.

>>> t1=((1,2),(3,4),(9,))

>>>max(t1)

Q39. >>>min(t1) will return an error if the tuple t1 contains value of mixed data type.(T/F)

Q40. Which of the following function return the frequency of particular element in tuple?


Share with others

Leave a Reply

error: Content is protected !!