Question: Pass the Aux Function Name: longestSong ( ) Parameters: albumID ( int ) Returns: longest ( str ) Description: Your friend just passed you the

Pass the Aux Function Name: longestSong() Parameters: albumID ( int ) Returns: longest ( str ) Description: Your friend just passed you the aux cord in their car. You're only allowed to play one Taylor Swift song, so you want to make it last as long as possible. Given an album ID, find how long it would take to sing each song by finding each track's word count and assuming that it takes 1.5 seconds to sing each word in a song. For every song that will take over 10 minutes to sing, print the string "{song} would be a good choice..." . Finally, re turn information about the longest song on the album in terms of how long it will take to sing it as a string in the format "{longestSong},{minutes} mins and {seconds} secs", with minutes and seconds rounded to two decimal places. If the given album ID is invalid, return the string "Let's listen to something else." . Note: Each word in the song's lyrics (separated by a space) should be counted toward its word count. To separate each word by only spaces, be sure to use .split("").>>> longestSong(7) Miss Americana & The Heartbreak Prince would be a good choice... Paper Rings would be a good choice... Daylight would be a good choice... Miss Americana & The Heartbreak Prince, 11.0 mins and 21.0 secs >>> longestSong(10) Would've, Could've, Should've would be a good choice... Would've, Could've, Should've, 10.0 mins and 36.0 secs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!