/**
 * This function checks if the athlete gets a medal based on their distance and time
 */
fun checkMedal(distance: Int, time: Int): String {

    // Use a ternary operator to check multiple conditions
    val medal = if (distance >= 10 && time <= 10) "Gold"
    else if (distance >= 8 && time <= 12) "Silver"
    else if (distance >= 6 && time <= 14) "Bronze"
    else "No medal"

    return medal
}
/**
 * This function checks if the athlete gets a medal based on their distance and time
 */
fun checkMedal(distance: Int, time: Int): String {
/**
 * This function checks if the athlete gets a medal based on their distance and time
 */
fun checkMedal(distance: Int, time: Int): String {

    // Use a ternary operator to check multiple conditions
    val medal = if (distance >= 10 && time <= 10) "Gold"
    else if (distance >= 8 && time <= 12) "Silver"
    else if (distance >= 6 && time <= 14) "Bronze"
    else "No medal"

    return medal
}