def padded_num(num=-1, max_num=1):
    """
    The function that convert int to zero padded string

    :param int num: Number to be converted to string
    :param int max_num: Numbers to determine digits
    :return:
    """
    digit = len(str(max_num))
    if num >= 0:
        return str(num).zfill(digit)
    else:
        return '?' * digit
