<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Mean(self):
 """Computes the mean of a PMF. Returns: float mean """

        mu = 0.0
        for x, p in self.d.iteritems():
            mu += p * x
        return mu