/**
 * This function calculates the profit a farmer can earn based on the number of crops harvested and the weather conditions.
 *
 * @param crops The number of crops harvested.
 * @param weather The current weather conditions, either "sunny" or "rainy".
 * @return The profit earned by the farmer.
 */
fun farmerProfit(crops: Int, weather: String): Int {

    // Calculate profit using when expression
    val profit = crops * when (weather) {
        "sunny" -> 100
        "rainy" -> 50
        "snowy" -> 75
        else -> 0
    }
    return profit
}
/**
 * This function calculates the profit a farmer can earn based on the number of crops harvested and the weather conditions.
 *
 * @param crops The number of crops harvested.
 * @param weather The current weather conditions, either "sunny" or "rainy".
 * @return The profit earned by the farmer.
 */
fun farmerProfit(crops: Int, weather: String): Int {
/**
 * This function calculates the profit a farmer can earn based on the number of crops harvested and the weather conditions.
 *
 * @param crops The number of crops harvested.
 * @param weather The current weather conditions, either "sunny" or "rainy".
 * @return The profit earned by the farmer.
 */
fun farmerProfit(crops: Int, weather: String): Int {

    // Calculate profit using when expression
    val profit = crops * when (weather) {
        "sunny" -> 100
        "rainy" -> 50
        "snowy" -> 75
        else -> 0
    }
    return profit
}