/**
 * A game developer wants to determine the final score of a player based on three scores obtained in different levels of the game.
 * Each score ranges from 0 to 100. The final score is calculated as the sum of the three scores multiplied by a factor of 2 if all scores are greater than or equal to 80,
 * otherwise multiplied by a factor of 1. Determine the final score of the player.
 *
 * @param score1 the first score obtained by the player
 * @param score2 the second score obtained by the player
 * @param score3 the third score obtained by the player
 * @return the final score of the player
 */
fun checkPlayerScore(score1: Int, score2: Int, score3: Int): Int {

    // Use ternary operator to calculate the final score based on the conditions
    val finalScore = (score1 + score2 + score3) * (if (score1 >= 80 && score2 >= 80 && score3 >= 80) 2 else 1)
    return finalScore
}
/**
 * A game developer wants to determine the final score of a player based on three scores obtained in different levels of the game.
 * Each score ranges from 0 to 100. The final score is calculated as the sum of the three scores multiplied by a factor of 2 if all scores are greater than or equal to 80,
 * otherwise multiplied by a factor of 1. Determine the final score of the player.
 *
 * @param score1 the first score obtained by the player
 * @param score2 the second score obtained by the player
 * @param score3 the third score obtained by the player
 * @return the final score of the player
 */
fun checkPlayerScore(score1: Int, score2: Int, score3: Int): Int {
/**
 * A game developer wants to determine the final score of a player based on three scores obtained in different levels of the game.
 * Each score ranges from 0 to 100. The final score is calculated as the sum of the three scores multiplied by a factor of 2 if all scores are greater than or equal to 80,
 * otherwise multiplied by a factor of 1. Determine the final score of the player.
 *
 * @param score1 the first score obtained by the player
 * @param score2 the second score obtained by the player
 * @param score3 the third score obtained by the player
 * @return the final score of the player
 */
fun checkPlayerScore(score1: Int, score2: Int, score3: Int): Int {

    // Use ternary operator to calculate the final score based on the conditions
    val finalScore = (score1 + score2 + score3) * (if (score1 >= 80 && score2 >= 80 && score3 >= 80) 2 else 1)
    return finalScore
}