/**
 * This exercise requires you to multiply each letter in a word by a given number 'n' in order to create a new word.
 * The task is to complete the code by writing a loop statement that iterates through the given word and multiplies each letter by 'n'.
 *
 * Example:
 * multiplyLetters("hello", 3) => "hhheeeelllllooo"
 *
 * @param word A string representing the word to be multiplied.
 * @param n An integer representing the number of times each letter should be multiplied.
 * @return A new string with each letter in the word multiplied 'n' times.
 *
 * Hint:
 * - You can use a for loop to iterate through the characters in the word.
 * - Use string concatenation to build the new word.
 */
fun multiplyLetters(word: String, n: Int): String {

    var newWord = ""
    for (letter in word) {
        newWord += letter.toString().repeat(n)
    }
    return newWord
}
/**
 * This exercise requires you to multiply each letter in a word by a given number 'n' in order to create a new word.
 * The task is to complete the code by writing a loop statement that iterates through the given word and multiplies each letter by 'n'.
 *
 * Example:
 * multiplyLetters("hello", 3) => "hhheeeelllllooo"
 *
 * @param word A string representing the word to be multiplied.
 * @param n An integer representing the number of times each letter should be multiplied.
 * @return A new string with each letter in the word multiplied 'n' times.
 *
 * Hint:
 * - You can use a for loop to iterate through the characters in the word.
 * - Use string concatenation to build the new word.
 */
fun multiplyLetters(word: String, n: Int): String {
/**
 * This exercise requires you to multiply each letter in a word by a given number 'n' in order to create a new word.
 * The task is to complete the code by writing a loop statement that iterates through the given word and multiplies each letter by 'n'.
 *
 * Example:
 * multiplyLetters("hello", 3) => "hhheeeelllllooo"
 *
 * @param word A string representing the word to be multiplied.
 * @param n An integer representing the number of times each letter should be multiplied.
 * @return A new string with each letter in the word multiplied 'n' times.
 *
 * Hint:
 * - You can use a for loop to iterate through the characters in the word.
 * - Use string concatenation to build the new word.
 */
fun multiplyLetters(word: String, n: Int): String {

    var newWord = ""
    for (letter in word) {
        newWord += letter.toString().repeat(n)
    }
    return newWord
}