def test_student(incorrect_msg, max_attempts, description, solution):
    """
    Parameters: There are 4 parameters in this function:
        -incorrect_msg_list is a list of strings that correspond to messages to show to the student if the answer is incorrect (e.g., [“Better luck next time”, “Not quite right”, “Try again!”]. It’s up to you what contents you put in this list but you should have at least 3 strings in it
        - max_attempts: this is an integer representing the max number of attempts a student has to get the answer right
        - description: this is a string that corresponds to a problem description (the problem the student is asked to solve)
        - solution: this is a string that corresponds to the solution to the problem they have to solve 

    """
    # Initialize the variable keeping track of the number of attempts to 0
    attempts = 0
    while True:
        # Increase number of attempts the did
        attempts += 1
        # Display the problem, stored in the parameter description
        print('The problem is {}'.format(description))
        # Grab the answer
        sol = input('Your answer: ')
        # and strip the answer of whitespace to make processing easier
        sol = sol.strip()
        # Compare the user’s solution to the correct one
        if sol == solution.strip():
            # If they got it right, tell them a  happy message and return True
            print('Great job!')
            return True
        elif attempts < max_attempts:
            # number of tries left
            tries_left = max_attempts - attempts
            # tell them to try again and the number of tries they have left
            print('{} You have {} tries left.'.format(
                incorrect_msg, tries_left))
        # If the number of tries exceeds the max_attempts
        elif attempts == max_attempts:
            # then tell them they are out of tries AND what the actual answer was
            print(
                'Out of tries for this one - moving on. The answer was {}'.format(solution))
            # and return False
            return False