Here the teacher is to perform two operations:
(i) Selecting a boy from among the 27 boys and
(ii) Selecting a girl from among 14 girls.
The first of these can be done in 27 ways and second can be performed in 14 ways. By the fundamental principle of counting, the required number of ways is 27 * 14 = 378.