A play that ends with death is traditionally considered a tragedy. A tragedy is a type of a play which ends on a sad note - usually, one (or sometimes many, even all characters) die, and usually in a very tragic way. Take Hamlet for example - almost everyone dies there: Hamlet, Gertrude, Claudius, Ophelia - almost every important characters is gone by the end of the play.
I would say the theme is literary. The kid who doesn't study gets a bad grade while the one who did is the first one finished. But it isn't stated explicitly (as a direct or stated theme would be). I hope this helps.