If it teaches you to be a little bit more responsible about your education and future I would say it is a worthwhile lesson.
Although to be brutally honest, it shows a slight tendency to immaturity that you feel the need to ask the question. What were you expecting... sympathy ?
What you did was wrong and in your heart you know it, you were caught and the teacher made the punishment fit the crime. Want my sincerely advice.... learn you lesson and at the earliest opportunity apologise to the teacher in question.