/**
 * This exercise focuses on finding an alternative to the ternary operator in Python when working with dictionaries.
 * It expects a dictionary and a key as arguments, and aims to return the value associated with the key.
 * If the key is present in the dictionary, return the corresponding value; otherwise, return 'Default'.
 *
 * Your task is to complete the code.
 *
 * Example:
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "banana"
 * Expected output: 'yellow'
 *
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "orange"
 * Expected output: 'Default'
 */
fun ternaryOperatorAlternative(dictionary: Map<String, String>, key: String): String {

    return dictionary[key] ?: "Default"
}
/**
 * This exercise focuses on finding an alternative to the ternary operator in Python when working with dictionaries.
 * It expects a dictionary and a key as arguments, and aims to return the value associated with the key.
 * If the key is present in the dictionary, return the corresponding value; otherwise, return 'Default'.
 *
 * Your task is to complete the code.
 *
 * Example:
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "banana"
 * Expected output: 'yellow'
 *
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "orange"
 * Expected output: 'Default'
 */
fun ternaryOperatorAlternative(dictionary: Map<String, String>, key: String): String {
/**
 * This exercise focuses on finding an alternative to the ternary operator in Python when working with dictionaries.
 * It expects a dictionary and a key as arguments, and aims to return the value associated with the key.
 * If the key is present in the dictionary, return the corresponding value; otherwise, return 'Default'.
 *
 * Your task is to complete the code.
 *
 * Example:
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "banana"
 * Expected output: 'yellow'
 *
 * val dictionary = mapOf("apple" to "red", "banana" to "yellow", "cherry" to "red")
 * val key = "orange"
 * Expected output: 'Default'
 */
fun ternaryOperatorAlternative(dictionary: Map<String, String>, key: String): String {

    return dictionary[key] ?: "Default"
}