def to3(p):
    """
    Returns a string representation of p with at least 3 chars

    Adds leading 0's if necessary

    Parameter n: number to pad
    Precondition: p is an int
    """
    assert type(p) == int, repr(p)+' is not an int'     # get in the habit

    if p < 10:
        return '00' + str(p)
    elif p < 100:
        return '0' + str(p)

    return str(p)