Consider a playlist stored in a text file. The example below is named 265. list
ID: 3575667 • Letter: C
Question
Consider a playlist stored in a text file. The example below is named 265. list and demonstrates the way such files are formatted. Note the individual tracks in the playlist correspond to the lines following the third line. Write a Python function that accepts the name of an input file containing data such as that above and returns an instance of a PIaylist class. As part of your solution you must also define the PIaylist class. Amongst other class attributes, the tracks in a PIaylist instance must be stored in a single list attribute of that instance. There must be a method in PIayList named total Length () which returns a tuple containing the number of hours, minutes and seconds needed to play all of the tracks from start to finish. Regular expressions must be used where appropriate. Some marks will be given for the quality of your solution. Your indentation is to be clearly indicated. Some marks will be given for the quality of your answer.Explanation / Answer
* Write a python function that accepts the name of an input file containing data such as that above and return an instance of a playlist class
* Regular explression must b used where appropriate
* there must me a method in playlist named total length() which returns a tuple containing the number of hours,minutes and seconds needed to play all the tracks from start to finish
* As part of your solution you must also define the playlist class . amoung other class attributes, the tracks in a playlist instance must be stored in a single list attribute of that instance
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.