Important QnA creating tuples for Class 11

In this article we will provide you Important QnA creating tuples for Class 11. So here we go!

Important QnA creating tuples for Class 11

As the pattern of CBSE class 12 sample paper, we will start Important QnA creating tuples for Class 11 with objective type questions then you will get subjective type questions of the chosen topic.

Objective Type Questions

  1. A __________ is a set of values of specific sequence. (Ans. – Tuple)
  2. Tuples are mutable as lists in python. (True/False)
  3. Whenever any changes made to any element, the tuple creates a new tuple. (True/False)
  4. Which of the following statement creates an empty tuple?
    1. t = Empty()
    2. t=()
    3. t=Tuple()
    4. t=empty_tuple()
  5. t=67,t=(67) or t=(67,) are the same statements. (True/False)
  6. Which of the following is the correct statement to create a tuple from the existing sequence?
    1. t = ()
    2. t = new tuple(<sequence>)
    3. t = tuple(<sequence>)
    4. t = Tuple(<sequence>)
  7. Tuples created using comma-seperated tuple of expressions is called ______________ tuples. (Ans. Nested)
  8. What will be output of: t=(11,22,33,44);print(t[1+2])?
    1. 3
    2. 33
    3. 44
    4. 1+2
  9. What will be the output of print(t[-3]) with respect to tuple created int Q-8?
    1. 22
    2. 33
    3. 44
    4. 11
  10. If t=(4,3,2), then what will be the output of:print((t*2)+t)?
    1. (4,3,2)
    2. (8,6,4)
    3. (4,3,2,4,3,2,4,3,2)
    4. (16,9,4,4,3,2)
  11. Consider the above tuple and find out which of the following statements will produce the same output:
    1. tp[:-1]
    2. tp[0:3]
    3. tp[0:2]
    4. tp[-2]
  12. If t =(20,56,89,54,32,12), then what will be output for print(t[4:-1])?
    1. (20,56,89,54,32,)
    2. (32,)
    3. (12,32,)
    4. (56,89,54,32,12)
  13. The ____________ operator is used to check whether particular element is a part of tuple or not. (Ans. – in)
  14. If t=(3,2,1), then what will be the output of print(t + (4))?
    1. (3,2,1,4,)
    2. (4,3,2,1)
    3. Error
    4. None of these
  15. What will be the output of : t=(44,56,78);print(77 not in t)?
    1. Error
    2. True
    3. False
    4. 77

Now lets see the subjective type questions for QnA creating tuples for Class 11.

Subjective Type Questions

Recommended Article for Answers

  1. What do you mean by tuples? Illustrate your answer with an example.
  2. What is the significance of this statement with respect to a tuple in python?
    1. t=(“T”)
    2. t=(“T”,)
    3. t=(‘T’,)
  3. What is the difference between these two statements?
    1. t= 6,7,8
    2. t=(6,7,8)
  4. Create a tuple of student’s data by including rollno, name, and marks or 3 subjects.
  5. What will be the output of t=tuple(‘TutorialAICSIP’)? Explain it.
  6. How to convert a list into a tuple? Explain with example.
  7. Create a tuple with 5 elements of your choice (The values entered by the user).
  8. Write similarities and difference between tuple and list.
  9. What do you mean by the immutability of tuples? Illustrate your answer with an example.
  10. What are the ways to access elements of the tuple? Enlist them and explain each of them in two lines.
  11. How you can check the availability of a value in a tuple? Explain all the ways to check it.
  12. How you can join multiple tuples? Explain with example.

In the next section of QnA creating tuples for Class 11 output questions are given:

Output Questions

[1]

t =('t','u','p','l','e')
t = ('Tuple',) + t[3:]
print(t)

[2]

t1=(78,99,11)
t2=(10,20)
t3=t1+t2*2
t4=t3+t2
print((t1+t2)*2)
print(t3)
print(t4)

[3]

t1=(55,66,7)
t2=('55','66','7')
print(t1*2)
print(t1+t2)

[4]

t=(78,67,88,99,11,34,56)
s1=[:3]
s2=[3:3]
s3=[3:]
s4=[-3:3]
s5=[:-3]
s6=[3:-3]
s7=[-3:3]
s8=[:]
s9=[3:-1]
s10=[0:3]

[5]

t = [13,23,43,63,83]
slice1 = t[0:4]
print(slice1)

slice1=t[2:-1]
print(slice1)

slice1=t[2:33]
print(slice1)

print(t[0:10:2])

print(t[0:10:3])
print(t[:5:3])
print(t[::3])
print(t[4::2])


[6]

t = (14,34,54,74,94)
ft = (14,34,54,74,94)
for i in range(len(t)):
    if i%2==0:
        print(i-3,",",end="")
print()
print(t[-1]+t[-2]+t[-3])
print(t[4]-t[2]-t[0])

Error Questions

[1]

t=(56,89,54,32,12)
t[1]=99
print(t+(4))
print(t[5])

[2]

t1=(55,66,7)
t2=('55','66','7')
t3=(4)
print(t1*'2')
print(t1+t2+t3)

[3]

t = (14,34,54,74,94)
for i in range(t):
    if i%2==0:
        print(t-3,",",end="")

I hope these questions will help you to understand the concept well. If you have any specific concern about this article – QnA creating tuples for Class 11, feel free to reflect in the comment section.

Do not forget to share your views about this article in comment section. If you learnt and understood the concept hit the like button given below the article.

Thank you very much for visiting out blog.

Take a look on the following links:

Computer Science Class XI

Comment Your Views

%d bloggers like this: