I've spent some time thinking about what factors determine exam results. It clearly depends upon the amount of effort you put into it (and the preparations) and your skill level, but also how lucky you are with the tasks you get on the exam. I think I've come up with a mathematical relationship for it 
Result = Effort x Skills x Fluke
That is, the exam result is the product of effort, skills and how lucky you are. Here, all factors are non-negative, which gives us a non-negative result as well. A result of zero is a fail, anything above that is a pass.
As we can see, if any of the three factors are zero, you will fail. This is easy to explain. First, if the effort is zero, you didn't even bother showing up on the exam, so you will clearly fail. Further on, if you have zero skills, you don't even know how to read, yet alone remember anything, so no matter how much effort you put into it, you will still fail. Finally, a zero luck means maximum bad luck. An example of this could be to get the following exam:
Task 1 of 1: (100 %)
Is P = NP? Prove your answer.
We can also get some more interesting relationships out of the formula. By dividing by Effort on both sides, we get
Result / Effort = Skills x Fluke.
This tells us that, if you got a non-failing grade on the exam, while the effort approaches zero, you either have extreme skills, or you had a huge amount of luck.
We can also get Result / Skills = Effort x Fluke. So if you got a passing grade, and have zero skills, you put in impossible amounts of effort, or had impossible amounts of luck, which is just not possible, so you could not possibly pass the exam.
So, by using this formula, you should be able to develop a strategy for receiving good exam results
Good luck!