In a class of 20 students, 16 play soccer, 12 play hockey and 2 do not play any of the two games.How many students play only hockey?

Using a Venn diagram, let x be those that play both games

fill in all the given data
so we have:
16-x + x + 12-x + 2 = 20
-x = -8
x = 8

so "only hockey" = 16-8 = 8

Draw a Venn diagram.

18 play something
b = play both
16-b + 12-b + b = 18
28 - b =18
b = 10
h = 12 - b = 2