Tuples in python: 19 MCQs
All 19 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 10 questions
Q1. Which of the following is a correct way to create an empty tuple in Python?
BeginnerAnswers and explanations are in the Veda app.
Q2. What is the output of `len((1, 2, 3))`?
BeginnerAnswers and explanations are in the Veda app.
Q3. Which of the following correctly accesses the second element of tuple `t = (10, 20, 30)`?
BeginnerAnswers and explanations are in the Veda app.
Q4. What is the output of `(1, 2, 3) == (1, 2, 3)`?
BeginnerAnswers and explanations are in the Veda app.
Q5. What is the output of `t = (1, 2, 3); print(t[-1])`?
BeginnerAnswers and explanations are in the Veda app.
Q6. Which built-in function converts a list to a tuple?
BeginnerAnswers and explanations are in the Veda app.
Q7. Tuples are mutable in Python.
BeginnerAnswers and explanations are in the Veda app.
Q8. A tuple can contain elements of different data types.
BeginnerAnswers and explanations are in the Veda app.
Q9. The `in` operator can be used to check if an element exists in a tuple.
BeginnerAnswers and explanations are in the Veda app.
Q10. Tuples support item assignment like lists.
BeginnerAnswers and explanations are in the Veda app.
Building up · 9 questions
Q11. Which of the following statements about tuples is TRUE?
IntermediateAnswers and explanations are in the Veda app.
Q12. What is the result of `(1, 2) + (3, 4)`?
IntermediateAnswers and explanations are in the Veda app.
Q13. What does `(1, 2, 3) * 2` return?
IntermediateAnswers and explanations are in the Veda app.
Q14. Which method can be used to find the index of a value in a tuple?
IntermediateAnswers and explanations are in the Veda app.
Q15. Which of the following is NOT a valid tuple operation?
IntermediateAnswers and explanations are in the Veda app.
Q16. What is the type of `x` after `x = 1, 2, 3`?
IntermediateAnswers and explanations are in the Veda app.
Q17. What does `t = (1, 2, 3); a, b, c = t; print(a)` output?
IntermediateAnswers and explanations are in the Veda app.
Q18. Which of the following creates a single-element tuple?
IntermediateAnswers and explanations are in the Veda app.
Q19. What is the result of `(1, 2, 3).count(2)`?
IntermediateAnswers and explanations are in the Veda app.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Paper Solver
Get Veda free See what students get
Free to start · Android app and web · More than 40 languages