/**
 * This function helps physical therapists calculate the recommended exercises for patients based on the hours spent and the intensity level.
 *
 * @param hoursSpent total hours spent on therapy sessions in a week
 * @param intensityLevel the intensity level of the therapy sessions on a scale from 1 to 5
 * @return A string indicating the recommended exercises for the patient.
 */
fun therapy(hoursSpent: Int, intensityLevel: Int): String {

    if (hoursSpent >= 10) {
        when {
            intensityLevel == 5 -> return "Advanced strength training exercises are recommended."
            intensityLevel >= 3 -> return "Intermediate strength training exercises are recommended."
            intensityLevel == 2 -> return "Beginner strength training exercises are recommended."
            else -> return "Light exercises like stretching and mobility work are recommended."
        }
    } else {
        var intensity = intensityLevel
        while (intensity > 0) {
            when {
                intensity == 5 -> return "Advanced cardiovascular exercises are recommended."
                intensity >= 3 -> return "Intermediate cardiovascular exercises are recommended."
                intensity == 2 -> return "Beginner cardiovascular exercises are recommended."
                else -> return "Light exercises like walking or swimming are recommended."
            }
            intensity--
        }
    }
    return ""
}
/**
 * This function helps physical therapists calculate the recommended exercises for patients based on the hours spent and the intensity level.
 *
 * @param hoursSpent total hours spent on therapy sessions in a week
 * @param intensityLevel the intensity level of the therapy sessions on a scale from 1 to 5
 * @return A string indicating the recommended exercises for the patient.
 */
fun therapy(hoursSpent: Int, intensityLevel: Int): String {
/**
 * This function helps physical therapists calculate the recommended exercises for patients based on the hours spent and the intensity level.
 *
 * @param hoursSpent total hours spent on therapy sessions in a week
 * @param intensityLevel the intensity level of the therapy sessions on a scale from 1 to 5
 * @return A string indicating the recommended exercises for the patient.
 */
fun therapy(hoursSpent: Int, intensityLevel: Int): String {

    if (hoursSpent >= 10) {
        when {
            intensityLevel == 5 -> return "Advanced strength training exercises are recommended."
            intensityLevel >= 3 -> return "Intermediate strength training exercises are recommended."
            intensityLevel == 2 -> return "Beginner strength training exercises are recommended."
            else -> return "Light exercises like stretching and mobility work are recommended."
        }
    } else {
        var intensity = intensityLevel
        while (intensity > 0) {
            when {
                intensity == 5 -> return "Advanced cardiovascular exercises are recommended."
                intensity >= 3 -> return "Intermediate cardiovascular exercises are recommended."
                intensity == 2 -> return "Beginner cardiovascular exercises are recommended."
                else -> return "Light exercises like walking or swimming are recommended."
            }
            intensity--
        }
    }
    return ""
}