A student attempts a prank during a lecture. The teacher holds up a stick in her hand and asks the student to come up and face the consequence(punishment) he deserves.
com up with your results for a problem
come+uppance= uppance sounds like offence, so when u do any offence punishments will COME behind you which is DESERVED
come up and take punishment