/**
 * Given a map of animals, modify the values of the animals' weights within a specified range.
 *
 * @param animals A map containing the animals' name as the key and their respective weight as the value.
 * @param start The lower bound of the weight range to modify (inclusive).
 * @param end The upper bound of the weight range to modify (inclusive).
 * @return The modified map of animals with updated weight values.
 */
fun modifyAnimals(animals: MutableMap<String, Int>, start: Int, end: Int): MutableMap<String, Int> {

    for ((animal, weight) in animals) {
        if (weight in start..end) {
            animals[animal] = weight + 1  // Modify the weight within the specified range
        }
    }
    return animals
}
/**
 * Given a map of animals, modify the values of the animals' weights within a specified range.
 *
 * @param animals A map containing the animals' name as the key and their respective weight as the value.
 * @param start The lower bound of the weight range to modify (inclusive).
 * @param end The upper bound of the weight range to modify (inclusive).
 * @return The modified map of animals with updated weight values.
 */
fun modifyAnimals(animals: MutableMap<String, Int>, start: Int, end: Int): MutableMap<String, Int> {
/**
 * Given a map of animals, modify the values of the animals' weights within a specified range.
 *
 * @param animals A map containing the animals' name as the key and their respective weight as the value.
 * @param start The lower bound of the weight range to modify (inclusive).
 * @param end The upper bound of the weight range to modify (inclusive).
 * @return The modified map of animals with updated weight values.
 */
fun modifyAnimals(animals: MutableMap<String, Int>, start: Int, end: Int): MutableMap<String, Int> {

    for ((animal, weight) in animals) {
        if (weight in start..end) {
            animals[animal] = weight + 1  // Modify the weight within the specified range
        }
    }
    return animals
}