Q.Suppose annual day of your school is to be celebrated. The school has decided to felicitate those parents of the students studying in classes XI and XII, who are the alumni of the same school. In this context, answer the following questions:
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →a) "Both parents are alumni" is the overlap of two groups — a set intersection (F ∩ M). b) "How varied are the ages" is a question about spread, answered by measures of dispersion: range and standard deviation.
a) Students whose both parents are alumni → set intersection
Model the parents as two sets over the students of classes XI and XII:
- F = the set of students whose father is an alumnus of the school,
- M = the set of students whose mother is an alumna of the school.
A student to be felicitated for both parents belongs to F ∩ M — the intersection of the two sets. The number the school needs is the count (cardinality) of that intersection.
F = {'Asha', 'Bilal', 'Chetan', 'Diya'} # father is an alumnus
M = {'Bilal', 'Diya', 'Esha'} # mother is an alumna
both = F & M # set intersection
print(both, len(both))
Expected output:
{'Bilal', 'Diya'} 2
Why the key line works: Python's & on sets keeps exactly the members present in both sets — the literal meaning of "both parents are alumni". (Had the school wanted at least one parent an alumnus, the technique would be the union F ∪ M instead.)
b) How varied are the ages of parents → measures of dispersion
"How varied" is not about the typical age (that would be the mean) but about the spread of ages. The appropriate statistical techniques are:
- Range = oldest parent's age − youngest parent's age: the quickest, roughest view of variation. …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.