← 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)
- A.9 11
- B.11 9
- C.11 11
- 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 →