def check_error(input_list, n):
    """
	Check type errors in the input
	"""
    for i in input_list:
        if type(i) is str:
            raise Exception('List items must be int or float values')
    try:
        n = int(n)
    except:
        raise Exception('n must be integer')
    if n < 1 or n > len(input_list):
        raise Exception('n must be between 1 and length of list')
