/**
 * This function calculates the average rating of a musician's albums.
 *
 * @param albumRatings List of ratings for each album.
 * @param numAlbums Total number of albums released by the musician.
 * @return Average rating of the musician's albums.
 */
fun calculateAverageRating(albumRatings: List<Int>, numAlbums: Int): Double {

    var total = 0

    // Iterate through each album rating
    for (rating in albumRatings) {
        total += rating
    }

    val average = total.toDouble() / numAlbums

    return average
}
/**
 * This function calculates the average rating of a musician's albums.
 *
 * @param albumRatings List of ratings for each album.
 * @param numAlbums Total number of albums released by the musician.
 * @return Average rating of the musician's albums.
 */
fun calculateAverageRating(albumRatings: List<Int>, numAlbums: Int): Double {
/**
 * This function calculates the average rating of a musician's albums.
 *
 * @param albumRatings List of ratings for each album.
 * @param numAlbums Total number of albums released by the musician.
 * @return Average rating of the musician's albums.
 */
fun calculateAverageRating(albumRatings: List<Int>, numAlbums: Int): Double {

    var total = 0

    // Iterate through each album rating
    for (rating in albumRatings) {
        total += rating
    }

    val average = total.toDouble() / numAlbums

    return average
}