/**
 * This function calculates the total bill for a veterinarian's office based on the number of visits for each pet.
 *
 * @param petNames A list of strings representing the names of the pets.
 * @param petVisits A list of integers representing the number of visits for each pet.
 * @return The total bill for all the pets.
 *
 * Example:
 * calculateTotalBill(listOf("Fluffy", "Spot", "Whiskers"), listOf(3, 5, 2))
 * Output: 285.0
 */
fun calculateTotalBill(petNames: List<String>, petVisits: List<Int>): Double {

    var totalBill = 0.0

    for (i in petNames.indices) {
        when {
            petVisits[i] >= 5 -> totalBill += petVisits[i] * 60.0
            petVisits[i] >= 3 -> totalBill += petVisits[i] * 50.0
            else -> totalBill += petVisits[i] * 40.0
        }
    }

    return totalBill
}
/**
 * This function calculates the total bill for a veterinarian's office based on the number of visits for each pet.
 *
 * @param petNames A list of strings representing the names of the pets.
 * @param petVisits A list of integers representing the number of visits for each pet.
 * @return The total bill for all the pets.
 *
 * Example:
 * calculateTotalBill(listOf("Fluffy", "Spot", "Whiskers"), listOf(3, 5, 2))
 * Output: 285.0
 */
fun calculateTotalBill(petNames: List<String>, petVisits: List<Int>): Double {
/**
 * This function calculates the total bill for a veterinarian's office based on the number of visits for each pet.
 *
 * @param petNames A list of strings representing the names of the pets.
 * @param petVisits A list of integers representing the number of visits for each pet.
 * @return The total bill for all the pets.
 *
 * Example:
 * calculateTotalBill(listOf("Fluffy", "Spot", "Whiskers"), listOf(3, 5, 2))
 * Output: 285.0
 */
fun calculateTotalBill(petNames: List<String>, petVisits: List<Int>): Double {

    var totalBill = 0.0

    for (i in petNames.indices) {
        when {
            petVisits[i] >= 5 -> totalBill += petVisits[i] * 60.0
            petVisits[i] >= 3 -> totalBill += petVisits[i] * 50.0
            else -> totalBill += petVisits[i] * 40.0
        }
    }

    return totalBill
}