/**
 * Given a word and a letter, find the index of the letter in the word.
 *
 * @param word A string representing the word.
 * @param letter A string representing the letter.
 * @return An integer representing the index of the letter in the word.
 * Returns -1 if the letter is not found in the word.
 *
 * Example:
 * findIndex("economist", "m") -> 8
 * findIndex("economist", "a") -> -1
 */
fun findIndex(word: String, letter: String): Int {

    return if (letter in word) {
        word.indexOf(letter)
    } else {
        -1
    }
}
/**
 * Given a word and a letter, find the index of the letter in the word.
 *
 * @param word A string representing the word.
 * @param letter A string representing the letter.
 * @return An integer representing the index of the letter in the word.
 * Returns -1 if the letter is not found in the word.
 *
 * Example:
 * findIndex("economist", "m") -> 8
 * findIndex("economist", "a") -> -1
 */
fun findIndex(word: String, letter: String): Int {
/**
 * Given a word and a letter, find the index of the letter in the word.
 *
 * @param word A string representing the word.
 * @param letter A string representing the letter.
 * @return An integer representing the index of the letter in the word.
 * Returns -1 if the letter is not found in the word.
 *
 * Example:
 * findIndex("economist", "m") -> 8
 * findIndex("economist", "a") -> -1
 */
fun findIndex(word: String, letter: String): Int {

    return if (letter in word) {
        word.indexOf(letter)
    } else {
        -1
    }
}