During the P6 post-exam activities, 2/7 of the pupils and an additional 12 pupils attended the guitar lessons. 1/4 of the remaining pupils and an additional 23 pupils attended the photography lessons. The rest of the pupils which were 193 pupils attended the hip-hop lessons.

(a) How many pupils attended the photography lessons?

(b) How many P6 pupils were there?