/**
 * This exercise focuses on appending new elements to lists using nested if-else statements.
 * You are given two lists, list1 and list2. Your task is to append elements from list2 to list1 based on certain conditions.
 * Here are the rules:
 * - If the length of list1 is less than 3, append the first element of list2 to list1.
 * - If the length of list1 is greater than or equal to 3 but less than 6, append the second element of list2 to list1.
 * - If the length of list1 is greater than or equal to 6, append the third element of list2 to list1.
 *
 * Your goal is to complete the code below to solve the exercise.
 */
fun appendElementsPsychologist(list1: MutableList<Int>, list2: List<Int>): List<Int> {

    if (list1.size < 3) {
        list1.add(list2[0])
    } else if (list1.size < 6) {
        list1.add(list2[1])
    } else {
        list1.add(list2[2])
    }
    
    return list1
}
/**
 * This exercise focuses on appending new elements to lists using nested if-else statements.
 * You are given two lists, list1 and list2. Your task is to append elements from list2 to list1 based on certain conditions.
 * Here are the rules:
 * - If the length of list1 is less than 3, append the first element of list2 to list1.
 * - If the length of list1 is greater than or equal to 3 but less than 6, append the second element of list2 to list1.
 * - If the length of list1 is greater than or equal to 6, append the third element of list2 to list1.
 *
 * Your goal is to complete the code below to solve the exercise.
 */
fun appendElementsPsychologist(list1: MutableList<Int>, list2: List<Int>): List<Int> {
/**
 * This exercise focuses on appending new elements to lists using nested if-else statements.
 * You are given two lists, list1 and list2. Your task is to append elements from list2 to list1 based on certain conditions.
 * Here are the rules:
 * - If the length of list1 is less than 3, append the first element of list2 to list1.
 * - If the length of list1 is greater than or equal to 3 but less than 6, append the second element of list2 to list1.
 * - If the length of list1 is greater than or equal to 6, append the third element of list2 to list1.
 *
 * Your goal is to complete the code below to solve the exercise.
 */
fun appendElementsPsychologist(list1: MutableList<Int>, list2: List<Int>): List<Int> {

    if (list1.size < 3) {
        list1.add(list2[0])
    } else if (list1.size < 6) {
        list1.add(list2[1])
    } else {
        list1.add(list2[2])
    }
    
    return list1
}