# raise ValueError('Custom Value error') # your message
# raise ValueError() # default message
def colorize_text(color_number, text):
    '''

    :param color_number:
    :param text: must be a string type
    :return:
    '''
    # condition to rise an error
    if type(text) is not str:
        raise TypeError('second parameter must be String value')
    color_number_list = [1, 2, 3, 4, 5, 6, 7]
    if type(color_number) is not int:
        raise TypeError('It must be int value')
    if color_number not in color_number_list:
        raise ValueError('Value must be int '
                         'in 1 to 7 range')
    if color_number == 1:
        return 'red'
    elif color_number == 2:
        return 'orange'
    elif color_number == 3:
        return 'yellow'
    elif color_number == 4:
        return 'green'
    elif color_number == 5:
        return 'blue'
    elif color_number == 6:
        return 'indigo'
    elif color_number == 7:
        return 'violet'


def get_rainbow_color(color_number):
    '''

    :param color_number: must be int in 1-7 renage
    :return:
    '''
    # condition to rise an error
    color_number_list = [1, 2, 3, 4, 5, 6, 7]
    if color_number is not int:
        raise TypeError('It must be int value')
    if color_number not in color_number_list:
        raise ValueError('Value must be int '
                         'in 1 to 7 range')
    if color_number == 1:
        return 'red'
    elif color_number == 2:
        return 'orange'
    elif color_number == 3:
        return 'yellow'
    elif color_number == 4:
        return 'green'
    elif color_number == 5:
        return 'blue'
    elif color_number == 6:
        return 'indigo'
    elif color_number == 7:
        return 'violet'


# color = get_rainbow_color(1)
# print(color)

# color = get_rainbow_color('test')
# print(color)

color1 = colorize_text(1, '1')
