Create a program that will allow a user to add, list, and delete songs from a playlist.
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →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()
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds