def get_int(message, default):
    """
    transfer user input to int numbers. Continue asking unless valid input.
    If user omit the input and default is set to non-None, get default number
    instand.

    :para message: input message should to user
    :type: string

    :para default: default value

    :rtype: int
    """
    while True:
        response = input(message)
        if response == '':
            if default is None:
                print('Please input an integer value.')
                continue
            else:
                return default
        else:
            try:
                return int(response)
            except ValueError:
                print('Please input integer value.')
