The answer is self-serving bias.
Self-serving bias is a common cognitive bias where individuals attribute their successes to internal factors, such as their own abilities or efforts, and their failures to external factors, such as the difficulty of the task or bad luck. In this scenario, Louis attributes his "A" on the MA103 exam to his own preparation (an internal factor) and his "D" on the PL100 WPR to the exam being hard (an external factor). This aligns with the definition of self-serving bias.
Actor-observer bias refers to the tendency to attribute one's own actions to external factors while attributing others' actions to internal factors. This bias involves comparing one's own behavior to that of others, which is not the case in the scenario provided. Louis is only discussing his own performance, not comparing it to others.
Fundamental attribution error is the tendency to overemphasize personal characteristics and ignore situational factors when judging others' behavior. This bias is about how we perceive others, not ourselves. Since Louis is explaining his own performance, this does not apply.
A self-fulfilling prophecy occurs when a belief or expectation, whether correct or not, affects a person's behavior in a way that causes the belief to become true. This scenario does not involve Louis having a belief that influences his behavior to make it come true; rather, it involves his attributions after the fact.