Calculate ratio_comment_to_code and return with the other values

def get_metrics(self):
        """Calculate ratio_comment_to_code and return with the other values"""
        if(self.sloc == 0):
            if(self.comments == 0):
                ratio_comment_to_code = 0.00
            else:
                ratio_comment_to_code = 1.00
        else:
            ratio_comment_to_code = float(self.comments) / self.sloc
        metrics = OrderedDict([('sloc', self.sloc), ('comments', self.comments),
                               ('ratio_comment_to_code', round(ratio_comment_to_code, 2))])
        return metrics