CIS115 Week 6 Lab Latest 2020 December

Question

Dot Image

CIS115 Programming Logic and Design

Week 6 Lab

Title of Lab: 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()

Having Trouble Meeting Your Deadline?

Get your assignment on CIS115 Week 6 Lab Latest 2020 December completed on time. avoid delay and – ORDER NOW

Dot Image

Order Solution Now

Similar Posts