/**
 * You are a farmer with a number of tasks to complete on your farm.
 * Complete the given tasks by using the appropriate methods from the List and Enumerate functions.
 *
 * @param farmSize Number of acres in your farm.
 * @param farmAnimals List of animals raised on your farm.
 *
 * Tasks:
 * 1. Print the total number of acres in your farm.
 * 2. Create a list of animal names by capitalizing the first letter of each animal in 'farmAnimals`.
 * 3. Print the index and name of each animal in 'farmAnimals`.
 * 4. Find and print the index of the animal named "Sheep" in 'farmAnimals`.
 */
fun farmerTasks(farmSize: Int, farmAnimals: List<String>) {

    // Task 1 - Print the total number of acres in your farm.
    val totalAcres = farmSize
    println("The total number of acres in your farm is: $totalAcres")

    // Task 2 - Create a list of animal names by capitalizing the first letter of each animal in 'farmAnimals`.
    val capitalizedAnimals = farmAnimals.map { it.capitalize() }

    // Task 3 - Print the index and name of each animal in 'farmAnimals`.
    for ((index, animal) in farmAnimals.withIndex()) {
        println("Index: $index, Animal: $animal")
    }

    // Task 4 - Find and print the index of the animal named "Sheep" in 'farmAnimals`.
    val sheepIndex = farmAnimals.indexOf("Sheep")
    if (sheepIndex != -1) {
        println("Index of Sheep: $sheepIndex")
    } else {
        println("Sheep not found in the list of animals.")
    }
}
/**
 * You are a farmer with a number of tasks to complete on your farm.
 * Complete the given tasks by using the appropriate methods from the List and Enumerate functions.
 *
 * @param farmSize Number of acres in your farm.
 * @param farmAnimals List of animals raised on your farm.
 *
 * Tasks:
 * 1. Print the total number of acres in your farm.
 * 2. Create a list of animal names by capitalizing the first letter of each animal in 'farmAnimals`.
 * 3. Print the index and name of each animal in 'farmAnimals`.
 * 4. Find and print the index of the animal named "Sheep" in 'farmAnimals`.
 */
fun farmerTasks(farmSize: Int, farmAnimals: List<String>) {
/**
 * You are a farmer with a number of tasks to complete on your farm.
 * Complete the given tasks by using the appropriate methods from the List and Enumerate functions.
 *
 * @param farmSize Number of acres in your farm.
 * @param farmAnimals List of animals raised on your farm.
 *
 * Tasks:
 * 1. Print the total number of acres in your farm.
 * 2. Create a list of animal names by capitalizing the first letter of each animal in 'farmAnimals`.
 * 3. Print the index and name of each animal in 'farmAnimals`.
 * 4. Find and print the index of the animal named "Sheep" in 'farmAnimals`.
 */
fun farmerTasks(farmSize: Int, farmAnimals: List<String>) {

    // Task 1 - Print the total number of acres in your farm.
    val totalAcres = farmSize
    println("The total number of acres in your farm is: $totalAcres")

    // Task 2 - Create a list of animal names by capitalizing the first letter of each animal in 'farmAnimals`.
    val capitalizedAnimals = farmAnimals.map { it.capitalize() }

    // Task 3 - Print the index and name of each animal in 'farmAnimals`.
    for ((index, animal) in farmAnimals.withIndex()) {
        println("Index: $index, Animal: $animal")
    }

    // Task 4 - Find and print the index of the animal named "Sheep" in 'farmAnimals`.
    val sheepIndex = farmAnimals.indexOf("Sheep")
    if (sheepIndex != -1) {
        println("Index of Sheep: $sheepIndex")
    } else {
        println("Sheep not found in the list of animals.")
    }
}