Create a program that will allow a user to add, list, and delete songs from a playlist.
Playlistin Python
Summary
Create a program that will allow a user to add, list, and delete songs from a playlist.
Deliverables
• A source code Python file.
• A Word document containing both source code and the screen print of the program outputs.
Lab Steps
The program should be modular. For example, you will want to have an add_song(playlist) function, a delete_song(playlist) function, a display_playlist(playlist) function, a display_menu() function, and a main().
Sample Output:
Welcome to the Playlist Creator!
1. Add a song
2. List all songs
3. Delete a song
4. Exit
Enter a menu option: 2
1 :Let it Snow
2 :I Have a Dream
Enter a menu option: 1
Please enter the song: Love Bites
Love Bites was added to the playlist
Enter a menu option: 2
1: Let it Snow
2 :I Have a Dream
3 :Love Bite
Enter a menu option: 3
Which number to delete: 3
Love Biteswas deleted
Enter a menu option: 2
1 :Let it Snow
2 :I Have a Dream
Enter a menu option: 4
Have a great day!
Specifications:
• The program should start with 2 songs in the playlist.
• Don’t forget to include at the end of the program the code:
o if __name__ == “__main__”:
main();
• Use this code for the delete_song(playlist) function:
defdelete_song(playlist):
number=int(input(“Which number to delete: “))
if number<1or number>len(playlist):
print(“Invalid numbern”)
else:
song=playlist.pop(number-1)
print(song,” was deletedn”)
print()
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
