function for teacher to get answer of pupil.