/**
 * This function calculates the total distance covered by a patient for a given number of days
 * based on the distances recorded each day.
 *
 * @param numDays The number of days for which distances were recorded.
 * @param distances A list of distances covered each day.
 * @return The total distance covered by the patient.
 */
fun calculateTotalDistance(numDays: Int, distances: List<Float>): Float {

    var totalDistance = 0f
    for (i in 0 until numDays) {
        totalDistance += distances[i]
    }
    return totalDistance
}
/**
 * This function calculates the total distance covered by a patient for a given number of days
 * based on the distances recorded each day.
 *
 * @param numDays The number of days for which distances were recorded.
 * @param distances A list of distances covered each day.
 * @return The total distance covered by the patient.
 */
fun calculateTotalDistance(numDays: Int, distances: List<Float>): Float {
/**
 * This function calculates the total distance covered by a patient for a given number of days
 * based on the distances recorded each day.
 *
 * @param numDays The number of days for which distances were recorded.
 * @param distances A list of distances covered each day.
 * @return The total distance covered by the patient.
 */
fun calculateTotalDistance(numDays: Int, distances: List<Float>): Float {

    var totalDistance = 0f
    for (i in 0 until numDays) {
        totalDistance += distances[i]
    }
    return totalDistance
}