/**
 * This function takes in a list representing the current inventory of a farmer, and an index of a crop to retrieve.
 * It returns the crop at the specified index in the inventory list.
 */
fun get_crop_by_index(farmerInventory: List<String>, index: Int): String? {

    return try {
        farmerInventory[index]
    } catch (e: IndexOutOfBoundsException) {
        null
    }
}
/**
 * This function takes in a list representing the current inventory of a farmer, and an index of a crop to retrieve.
 * It returns the crop at the specified index in the inventory list.
 */
fun get_crop_by_index(farmerInventory: List<String>, index: Int): String? {
/**
 * This function takes in a list representing the current inventory of a farmer, and an index of a crop to retrieve.
 * It returns the crop at the specified index in the inventory list.
 */
fun get_crop_by_index(farmerInventory: List<String>, index: Int): String? {

    return try {
        farmerInventory[index]
    } catch (e: IndexOutOfBoundsException) {
        null
    }
}