The student failed an exam because they were too tired to study and decided to rest instead. During the exam, they were unable to answer the questions and received a low grade. This made them feel lonely and disappointed. As a result, they decided to study harder in the future to improve their grades and achieve their life goals.