/**
 * A farmer is calculating the total number of crops in his farm.
 * He wants to exclude certain types of crops from the calculation using a break statement and continue statement.
 *
 * Complete the code below to calculate the total number of crops after skipping the excluded ones.
 *
 * @param farmData A list of dictionaries containing crop details. Each dictionary has the following keys:
 *                 - name (String): The name of the crop.
 *                 - quantity (Int): The quantity of crops available.
 *                 - exclude (Boolean): A flag indicating whether to exclude the crop from the calculation.
 * @return The total number of crops excluding the excluded ones.
 */
fun calculateTotalCrops(farmData: List<Map<String, Any>>): Int {

    var totalCrops = 0

    for (crop in farmData) {
        if (crop["exclude"] as Boolean) {
            // Skip the excluded crop using a continue statement
            continue
        }

        totalCrops += crop["quantity"] as Int

        if (crop["quantity"] as Int >= 100) {
            // Stop calculating the total crops if the quantity exceeds 100
            break
        }
    }

    return totalCrops
}
/**
 * A farmer is calculating the total number of crops in his farm.
 * He wants to exclude certain types of crops from the calculation using a break statement and continue statement.
 *
 * Complete the code below to calculate the total number of crops after skipping the excluded ones.
 *
 * @param farmData A list of dictionaries containing crop details. Each dictionary has the following keys:
 *                 - name (String): The name of the crop.
 *                 - quantity (Int): The quantity of crops available.
 *                 - exclude (Boolean): A flag indicating whether to exclude the crop from the calculation.
 * @return The total number of crops excluding the excluded ones.
 */
fun calculateTotalCrops(farmData: List<Map<String, Any>>): Int {
/**
 * A farmer is calculating the total number of crops in his farm.
 * He wants to exclude certain types of crops from the calculation using a break statement and continue statement.
 *
 * Complete the code below to calculate the total number of crops after skipping the excluded ones.
 *
 * @param farmData A list of dictionaries containing crop details. Each dictionary has the following keys:
 *                 - name (String): The name of the crop.
 *                 - quantity (Int): The quantity of crops available.
 *                 - exclude (Boolean): A flag indicating whether to exclude the crop from the calculation.
 * @return The total number of crops excluding the excluded ones.
 */
fun calculateTotalCrops(farmData: List<Map<String, Any>>): Int {

    var totalCrops = 0

    for (crop in farmData) {
        if (crop["exclude"] as Boolean) {
            // Skip the excluded crop using a continue statement
            continue
        }

        totalCrops += crop["quantity"] as Int

        if (crop["quantity"] as Int >= 100) {
            // Stop calculating the total crops if the quantity exceeds 100
            break
        }
    }

    return totalCrops
}