/**
 * You are a farmer and you have harvested a variety of vegetables.
 * The 'vegetables' list contains the names of the vegetables and
 * the 'weights' list contains the corresponding weights of each harvested vegetable, in kilograms.
 *
 * Your task is to calculate the total weight of the harvest.
 *
 * @param vegetables A list of strings representing the names of the harvested vegetables.
 * @param weights A list of floats representing the weights of each harvested vegetable.
 * @return A float representing the total weight of the harvest.
 *
 * Example:
 * calculateTotalHarvestWeight(listOf("carrot", "onion", "potato"), listOf(2.5f, 3.1f, 4.2f)) -> 9.8
 *
 * Note:
 * The 'vegetables' and 'weights' lists will always be of the same length.
 */
fun calculateTotalHarvestWeight(vegetables: List<String>, weights: List<Float>): Float {

    var totalWeight = 0.0f
    for (i in vegetables.indices) {
        totalWeight += weights[i]
    }
    return totalWeight
}
/**
 * You are a farmer and you have harvested a variety of vegetables.
 * The 'vegetables' list contains the names of the vegetables and
 * the 'weights' list contains the corresponding weights of each harvested vegetable, in kilograms.
 *
 * Your task is to calculate the total weight of the harvest.
 *
 * @param vegetables A list of strings representing the names of the harvested vegetables.
 * @param weights A list of floats representing the weights of each harvested vegetable.
 * @return A float representing the total weight of the harvest.
 *
 * Example:
 * calculateTotalHarvestWeight(listOf("carrot", "onion", "potato"), listOf(2.5f, 3.1f, 4.2f)) -> 9.8
 *
 * Note:
 * The 'vegetables' and 'weights' lists will always be of the same length.
 */
fun calculateTotalHarvestWeight(vegetables: List<String>, weights: List<Float>): Float {
/**
 * You are a farmer and you have harvested a variety of vegetables.
 * The 'vegetables' list contains the names of the vegetables and
 * the 'weights' list contains the corresponding weights of each harvested vegetable, in kilograms.
 *
 * Your task is to calculate the total weight of the harvest.
 *
 * @param vegetables A list of strings representing the names of the harvested vegetables.
 * @param weights A list of floats representing the weights of each harvested vegetable.
 * @return A float representing the total weight of the harvest.
 *
 * Example:
 * calculateTotalHarvestWeight(listOf("carrot", "onion", "potato"), listOf(2.5f, 3.1f, 4.2f)) -> 9.8
 *
 * Note:
 * The 'vegetables' and 'weights' lists will always be of the same length.
 */
fun calculateTotalHarvestWeight(vegetables: List<String>, weights: List<Float>): Float {

    var totalWeight = 0.0f
    for (i in vegetables.indices) {
        totalWeight += weights[i]
    }
    return totalWeight
}