I am a masters student in one of the Swiss federal institutes. There is a professor I wish to work under as a PhD student after my masters. In fact, this was the entire reason I decided to join the masters program in this institute. After coming here, I did a semester-long project with this professor and took a course under the professor.
I think I did well in the project. Although I did not do anything original, I read a lot of difficult things and made a nice report. I asked the professor if there is a research position that I can apply to and continue working for the coming semester (it is very rare to get research positions in pure mathematics as a student) and I was told that it may be possible and more will be informed in a week.
However, this week the final exam of the course that I had taken under this professor was scheduled and I am not too hopeful about the performance in the exam (I think it was mostly because I spent too much time in the project and spent less time in my coursework). This professor is famous and can easily get students more capable than me.
Do you think I should write an email to the professor apologizing and explaining about this? What should I say?