Hello~My first thought was that this is due to nerves. You say you have exams coming up, well, that is very stressful. If they go away after the tests, then you will have your answer, if not, then I would see your doctor, you may have diverticulitis or IBS, I am a little concerned that you may have seen blood in your stool, please don't ignore it if it continues, it could be polyps, hemorrhoids or, as I mentioned, diverticulitis.
Good luck on the exams.