def power_tail(x,y):
    """return x^y with tail recursion"""
    def power_tail_helper(x, y, accum):
        if(y==0):
            return accum
        return power_tail_helper(x, y-1, x*accum)
    return power_tail_helper(x, y, 1)