/**
 * A Psychologist is working on a program to determine a person's reaction based on their personality traits and stress level.
 * The program should return the most suitable reaction for a given situation.
 *
 * Complete the code below to create this program, by filling in the missing parts in the if-else-if statements.
 *
 * @param personality A string representing the person's personality traits. It can be one of the following: "introverted",
 * "extroverted", "ambiverted".
 * @param stressLevel An integer representing the person's stress level on a scale from 1 to 10.
 * @return The recommended reaction based on the person's personality and stress level.
 */
fun determineReaction(personality: String, stressLevel: Int): String {

    return when (personality) {
        "introverted" -> {
            when {
                stressLevel < 5 -> "Take a few deep breaths and calm yourself down."
                stressLevel in 5..7 -> "Take some time alone to reflect and recharge."
                else -> "Engage in soothing activities such as reading or taking a walk."
            }
        }
        // Add cases for other personality types if needed
        else -> "Unknown personality type"
    }
}
/**
 * A Psychologist is working on a program to determine a person's reaction based on their personality traits and stress level.
 * The program should return the most suitable reaction for a given situation.
 *
 * Complete the code below to create this program, by filling in the missing parts in the if-else-if statements.
 *
 * @param personality A string representing the person's personality traits. It can be one of the following: "introverted",
 * "extroverted", "ambiverted".
 * @param stressLevel An integer representing the person's stress level on a scale from 1 to 10.
 * @return The recommended reaction based on the person's personality and stress level.
 */
fun determineReaction(personality: String, stressLevel: Int): String {
/**
 * A Psychologist is working on a program to determine a person's reaction based on their personality traits and stress level.
 * The program should return the most suitable reaction for a given situation.
 *
 * Complete the code below to create this program, by filling in the missing parts in the if-else-if statements.
 *
 * @param personality A string representing the person's personality traits. It can be one of the following: "introverted",
 * "extroverted", "ambiverted".
 * @param stressLevel An integer representing the person's stress level on a scale from 1 to 10.
 * @return The recommended reaction based on the person's personality and stress level.
 */
fun determineReaction(personality: String, stressLevel: Int): String {

    return when (personality) {
        "introverted" -> {
            when {
                stressLevel < 5 -> "Take a few deep breaths and calm yourself down."
                stressLevel in 5..7 -> "Take some time alone to reflect and recharge."
                else -> "Engage in soothing activities such as reading or taking a walk."
            }
        }
        // Add cases for other personality types if needed
        else -> "Unknown personality type"
    }
}