/**
 * Given a sentence and start and end indices, this function
 * returns the sliced portion of the sentence between the specified indices.
 *
 * @param sentence A string representing the sentence.
 * @param startIndex The start index of the portion to be sliced.
 * @param endIndex The end index of the portion to be sliced.
 * @return The sliced portion of the sentence between the specified indices.
 *
 * Examples:
 * sliceString("Environmental science is fascinating", 13, 20) -> "science"
 * sliceString("Python programming is awesome", 4, 15) -> "n programming"
 * sliceString("Data analysis is an important skill in environmental research", 28, 43) -> "important skill"
 */
fun sliceString(sentence: String, startIndex: Int, endIndex: Int): String {

    return sentence.substring(startIndex, endIndex)
}
/**
 * Given a sentence and start and end indices, this function
 * returns the sliced portion of the sentence between the specified indices.
 *
 * @param sentence A string representing the sentence.
 * @param startIndex The start index of the portion to be sliced.
 * @param endIndex The end index of the portion to be sliced.
 * @return The sliced portion of the sentence between the specified indices.
 *
 * Examples:
 * sliceString("Environmental science is fascinating", 13, 20) -> "science"
 * sliceString("Python programming is awesome", 4, 15) -> "n programming"
 * sliceString("Data analysis is an important skill in environmental research", 28, 43) -> "important skill"
 */
fun sliceString(sentence: String, startIndex: Int, endIndex: Int): String {
/**
 * Given a sentence and start and end indices, this function
 * returns the sliced portion of the sentence between the specified indices.
 *
 * @param sentence A string representing the sentence.
 * @param startIndex The start index of the portion to be sliced.
 * @param endIndex The end index of the portion to be sliced.
 * @return The sliced portion of the sentence between the specified indices.
 *
 * Examples:
 * sliceString("Environmental science is fascinating", 13, 20) -> "science"
 * sliceString("Python programming is awesome", 4, 15) -> "n programming"
 * sliceString("Data analysis is an important skill in environmental research", 28, 43) -> "important skill"
 */
fun sliceString(sentence: String, startIndex: Int, endIndex: Int): String {

    return sentence.substring(startIndex, endIndex)
}