/**
 * This function takes a word and a character as input and counts the number of times the character appears in the word.
 *
 * @param word The word in which characters need to be counted.
 * @param char The character to be counted.
 * @return The count of occurrences of the character in the word.
 */
fun countOccurrence(word: String, char: Char): Int {

    var count = 0

    for (i in word.indices) {
        if (word[i] == char) {
            count++
        }
    }

    return count
}
/**
 * This function takes a word and a character as input and counts the number of times the character appears in the word.
 *
 * @param word The word in which characters need to be counted.
 * @param char The character to be counted.
 * @return The count of occurrences of the character in the word.
 */
fun countOccurrence(word: String, char: Char): Int {
/**
 * This function takes a word and a character as input and counts the number of times the character appears in the word.
 *
 * @param word The word in which characters need to be counted.
 * @param char The character to be counted.
 * @return The count of occurrences of the character in the word.
 */
fun countOccurrence(word: String, char: Char): Int {

    var count = 0

    for (i in word.indices) {
        if (word[i] == char) {
            count++
        }
    }

    return count
}