/**
 * This function takes in a string that represents an actor's name and returns the absolute value of the difference
 * between the ASCII values of the first and last characters of the name. It then creates an ordered pair of the actor's
 * name and age, where the age is calculated based on the absolute value.
 *
 * @param actor String representing the name of an actor/actress.
 * @return Pair<String, Int> An ordered pair containing the actor's name and age (absolute value of difference between
 * ASCII values of first and last characters).
 */
fun getActorAge(actor: String): Pair<String, Int> {

    val firstChar = actor[0].toInt()
    val lastChar = actor[actor.length - 1].toInt()

    val age = Math.abs(firstChar - lastChar)

    return Pair(actor, age)
}

// Example usage
/**
 * This function takes in a string that represents an actor's name and returns the absolute value of the difference
 * between the ASCII values of the first and last characters of the name. It then creates an ordered pair of the actor's
 * name and age, where the age is calculated based on the absolute value.
 *
 * @param actor String representing the name of an actor/actress.
 * @return Pair<String, Int> An ordered pair containing the actor's name and age (absolute value of difference between
 * ASCII values of first and last characters).
 */
fun getActorAge(actor: String): Pair<String, Int> {
/**
 * This function takes in a string that represents an actor's name and returns the absolute value of the difference
 * between the ASCII values of the first and last characters of the name. It then creates an ordered pair of the actor's
 * name and age, where the age is calculated based on the absolute value.
 *
 * @param actor String representing the name of an actor/actress.
 * @return Pair<String, Int> An ordered pair containing the actor's name and age (absolute value of difference between
 * ASCII values of first and last characters).
 */
fun getActorAge(actor: String): Pair<String, Int> {

    val firstChar = actor[0].toInt()
    val lastChar = actor[actor.length - 1].toInt()

    val age = Math.abs(firstChar - lastChar)

    return Pair(actor, age)
}

// Example usage