From a sample of 200 software engineers, determine the ratio of those proficient in Python to those proficient in Java using the given information: Category | Number Proficient in Python and Java | 50 Proficient in Python only | 70 Proficient in Java only | 60 Proficient in neither language | 20

- (a)11:12
- (b)12:11
- (c)7:6
- (d)6:7
Answer
Why
Correct — B. Each language's total is its 'only' group plus the overlap.
Python = both + Python only = 50 + 70 = 120
Java = both + Java only = 50 + 60 = 110
Python : Java = 120 : 110
Divide both by 10: 12 : 11 → option (b)
Why the others are wrong
- (a)11:12 — 11 : 12 is Java : Python, the right numbers in the wrong order. The question asks Python to Java, so Python's 120 comes first.
- (c)7:6 — 7 : 6 is 70 : 60, the 'only' groups alone. It leaves out the 50 engineers who know both languages, and they count in each total.
- (d)6:7 — 6 : 7 is 60 : 70, Java only to Python only: the overlap is dropped and the order reversed as well.
Concept
The table lists the four non-overlapping regions of a two-circle Venn diagram: both, Python only, Java only and neither.
A set's total is its 'only' region plus the overlap, so the 50 who know both are counted once in Python's total and once in Java's.
The 20 who know neither sit outside both circles and enter neither total.
The four rows add up to the sample: 50 + 70 + 60 + 20 = 200. That check confirms the table gives separate regions, not overlapping totals.
Key facts
- n(A) = n(A only) + n(A and B).
- n(A or B) = n(A) + n(B) − n(A and B) = 120 + 110 − 50 = 180.
- Those in neither set = total − n(A or B) = 200 − 180 = 20, matching the table.
Study next
Common traps
- Using the 'only' figures and writing 7 : 6.
- Reversing the order and writing Java : Python, 11 : 12.
- Adding the 20 'neither' engineers to one of the totals.
This item gives the Venn regions as a two-column table instead of a diagram and asks for the ratio of the two full sets, so the overlap has to be added back to each 'only' figure.
Related PYQs
No directly related past PYQ was found.