<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def percentage(self):
 """Returns the progress as a percentage."""

        if self.currval >= self.maxval:
            return 100.0
        return self.currval * 100.0 / self.maxval