/**
 * Given a dictionary of animal weights and the name of an animal,
 * this function returns the weight of the animal.
 *
 * @param dictionary A dictionary where the keys are the names of the animals and the values are their weights.
 * @param animal The name of the animal.
 * @return The weight of the specified animal.
 *
 * Example:
 * getAnimalWeight(mapOf("lion" to 150, "elephant" to 5000, "giraffe" to 1200), "elephant") // Output: 5000
 */
fun getAnimalWeight(dictionary: Map<String, Int>, animal: String): Int {

    // Get the weight of the animal from the dictionary
    return dictionary[animal] ?: 0
}
/**
 * Given a dictionary of animal weights and the name of an animal,
 * this function returns the weight of the animal.
 *
 * @param dictionary A dictionary where the keys are the names of the animals and the values are their weights.
 * @param animal The name of the animal.
 * @return The weight of the specified animal.
 *
 * Example:
 * getAnimalWeight(mapOf("lion" to 150, "elephant" to 5000, "giraffe" to 1200), "elephant") // Output: 5000
 */
fun getAnimalWeight(dictionary: Map<String, Int>, animal: String): Int {
/**
 * Given a dictionary of animal weights and the name of an animal,
 * this function returns the weight of the animal.
 *
 * @param dictionary A dictionary where the keys are the names of the animals and the values are their weights.
 * @param animal The name of the animal.
 * @return The weight of the specified animal.
 *
 * Example:
 * getAnimalWeight(mapOf("lion" to 150, "elephant" to 5000, "giraffe" to 1200), "elephant") // Output: 5000
 */
fun getAnimalWeight(dictionary: Map<String, Int>, animal: String): Int {

    // Get the weight of the animal from the dictionary
    return dictionary[animal] ?: 0
}