def calculateRC(batter):
    """
    RC = (hits + walk) * tot_bases / (ab + walk)
    """
    if (int(batter.ab) + int(batter.walk)) != 0:
        RC = (int(batter.hits) + int(batter.walk)) * int(batter.tot_bases) \
        /(int(batter.ab) + int(batter.walk))
    else:
        RC = -1
    return RC