/**
 * Given a list of songs and the index of a specific song, this function returns the duration of the song.
 *
 * @param songList a list of songs (strings)
 * @param songIndex the index of the song whose duration needs to be calculated (integer)
 * @return the duration of the song at the given index (float)
 */
fun musicianSongDuration(songList: List<String>, songIndex: Int): Float {

    val duration: Float
    if (songIndex >= 0 && songIndex < songList.size) {
        duration = songList[songIndex].split(":")[1].toFloat()
    } else {
        duration = -1.0f
    }
    return duration
}
/**
 * Given a list of songs and the index of a specific song, this function returns the duration of the song.
 *
 * @param songList a list of songs (strings)
 * @param songIndex the index of the song whose duration needs to be calculated (integer)
 * @return the duration of the song at the given index (float)
 */
fun musicianSongDuration(songList: List<String>, songIndex: Int): Float {
/**
 * Given a list of songs and the index of a specific song, this function returns the duration of the song.
 *
 * @param songList a list of songs (strings)
 * @param songIndex the index of the song whose duration needs to be calculated (integer)
 * @return the duration of the song at the given index (float)
 */
fun musicianSongDuration(songList: List<String>, songIndex: Int): Float {

    val duration: Float
    if (songIndex >= 0 && songIndex < songList.size) {
        duration = songList[songIndex].split(":")[1].toFloat()
    } else {
        duration = -1.0f
    }
    return duration
}