🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Tuples and Sets: all 15 questions

Quiz: Tuples and Sets · Question 15 of 15

You store a student's date of birth as (day, month, year) and it should never change. Which type fits best?

You store a student's date of birth as (day, month, year) and it should never change. Which type fits best?

  1. A.A list
  2. B.A set
  3. C.A dictionary
  4. D.A tuple
Answer & explanation

Correct answer: A tuple

A tuple is fixed and keeps order, which fits a value that should not change. A set would lose the order and drop equal numbers.

Can you get the rest right without peeking?

Take the timed Quiz: Tuples and Sets quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →