/**
 * Given a dictionary, divide each value in the dictionary by the given divisor.
 * The dictionary remains modified with the updated values.
 * The keys should remain the same.
 *
 * @param dictionary The input dictionary with key-value pairs.
 * @param divisor The divisor used to divide each value in the dictionary.
 */
fun divideAndUpdate(dictionary: MutableMap<String, Any>, divisor: Int) {

    try {
        for ((key, value) in dictionary) {
            if (value is Int || value is Float) {
                dictionary[key] = (value as Number).toFloat() / divisor
            }
        }
    } catch (e: ArithmeticException) {
        println("Error: Cannot divide by zero.")
    }
}
/**
 * Given a dictionary, divide each value in the dictionary by the given divisor.
 * The dictionary remains modified with the updated values.
 * The keys should remain the same.
 *
 * @param dictionary The input dictionary with key-value pairs.
 * @param divisor The divisor used to divide each value in the dictionary.
 */
fun divideAndUpdate(dictionary: MutableMap<String, Any>, divisor: Int) {
/**
 * Given a dictionary, divide each value in the dictionary by the given divisor.
 * The dictionary remains modified with the updated values.
 * The keys should remain the same.
 *
 * @param dictionary The input dictionary with key-value pairs.
 * @param divisor The divisor used to divide each value in the dictionary.
 */
fun divideAndUpdate(dictionary: MutableMap<String, Any>, divisor: Int) {

    try {
        for ((key, value) in dictionary) {
            if (value is Int || value is Float) {
                dictionary[key] = (value as Number).toFloat() / divisor
            }
        }
    } catch (e: ArithmeticException) {
        println("Error: Cannot divide by zero.")
    }
}