40 software professionals were interviewed for a job. 25 knew PYTHON 20 knew…

2024

40 software professionals were interviewed for a job. 25 knew PYTHON 20 knew JAVA and 7 knew neither language. How many knew both languages?

  1. A.

    20

  2. B.

    53

  3. C.

    12

  4. D.

    88

Attempted by 54 students.

Show answer & explanation

Correct answer: C

Use inclusion-exclusion.

  • Total professionals = 40.

  • Neither language = 7, so at least one language = 40 - 7 = 33.

  • Let x be the number who knew both Python and Java.

25 + 20 - x = 33

x = 45 - 33 = 12

Final answer: 12 professionals knew both languages.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 1