Answer
Let
P,Q are the switches in the classrooms
0 mean down
1 mean up
--when one switch is up and the other is down the light is on,
-- moving the switch that is down to the up position turns the light off.
So when P = 1 and Q = 1, then R = 0. It follows that the
input/output table has the following appearance:
Work Step by Step
One circuit (among many) having the upper input/output table is the following: