def getRank(width):
 return int(math.floor((3.0 * math.log10(width))))

def getRank ( width ) : return int ( math . floor ( ( 3.0 * math . log10 ( width ) ) ) )
get the rank which is 0 at 1 and increases by three every power of ten .