🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: 4NF and 5NF: all 10 questions

Quiz: 4NF and 5NF · Question 6 of 10

What does this print? (code)

What does this print?

subjects = {'Asha': ['DBMS', 'OS', 'CN'], 'Ravi': ['Java']}
languages = {'Asha': ['Hindi', 'English', 'Marathi'], 'Ravi': ['English', 'Tamil']}
combined = sum(len(subjects[t]) * len(languages[t]) for t in subjects)
split = sum(len(subjects[t]) + len(languages[t]) for t in subjects)
print(combined, split)
  1. A.9 11
  2. B.11 9
  3. C.11 11
  4. D.8 9
Answer & explanation

Correct answer: 11 9

One table needs 3×3 + 1×2 = 11 rows (combinations multiply); two tables need (3+3) + (1+2) = 9 rows (lists just add up).

Can you get the rest right without peeking?

Take the timed Quiz: 4NF and 5NF quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →