/**
 * This function calculates the optimal distance a patient should walk during a physical therapy session.
 * The optimal distance is determined by the given duration of the session and the force applied by the patient.
 *
 * @param duration the duration of the physical therapy session in minutes.
 * @param force the force applied by the patient during the therapy session.
 * @return the optimal distance in meters the patient should walk during the session.
 */
fun calculateOptimalDistance(duration: Int, force: Float): Float {

    // Calculate the optimal distance based on duration and force
    var optimalDistance = 0.0f

    when {
        duration <= 15 -> optimalDistance = 1000 * force
        duration <= 30 -> optimalDistance = 2000 * force
        duration <= 45 -> optimalDistance = 3000 * force
        duration <= 60 -> optimalDistance = 4000 * force
        else -> println("Invalid duration entered. Please enter a value between 0 and 60 minutes.")
    }

    return optimalDistance
}
/**
 * This function calculates the optimal distance a patient should walk during a physical therapy session.
 * The optimal distance is determined by the given duration of the session and the force applied by the patient.
 *
 * @param duration the duration of the physical therapy session in minutes.
 * @param force the force applied by the patient during the therapy session.
 * @return the optimal distance in meters the patient should walk during the session.
 */
fun calculateOptimalDistance(duration: Int, force: Float): Float {
/**
 * This function calculates the optimal distance a patient should walk during a physical therapy session.
 * The optimal distance is determined by the given duration of the session and the force applied by the patient.
 *
 * @param duration the duration of the physical therapy session in minutes.
 * @param force the force applied by the patient during the therapy session.
 * @return the optimal distance in meters the patient should walk during the session.
 */
fun calculateOptimalDistance(duration: Int, force: Float): Float {

    // Calculate the optimal distance based on duration and force
    var optimalDistance = 0.0f

    when {
        duration <= 15 -> optimalDistance = 1000 * force
        duration <= 30 -> optimalDistance = 2000 * force
        duration <= 45 -> optimalDistance = 3000 * force
        duration <= 60 -> optimalDistance = 4000 * force
        else -> println("Invalid duration entered. Please enter a value between 0 and 60 minutes.")
    }

    return optimalDistance
}