def success_rate(self):
if self.successes + self.fails == <NUM_LIT:0>:<EOL><INDENT>success_rate = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>total_attempts = self.successes + self.fails<EOL>success_rate = (self.successes * <NUM_LIT:100> / total_attempts)<EOL><DEDENT>return success_rate<EOL>
Returns a float with the rate of success from all the logged results.