Using Python  For this assignment, we’re going to build our own song remixing solution. As an example: given the following American children’s song (this is ONE of the 3 songs I’m giving you in the starter code that includes the data you'll use for your program): SONG = ['old macdonald had a farm - ee-i-ee-i-o.',         'and on that farm he had a cow - ee-i-e

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Using Python 

For this assignment, we’re going to build our own song remixing solution.

As an example: given the following American children’s song (this is ONE of the 3 songs I’m giving you in the starter code that includes the data you'll use for your program):

SONG = ['old macdonald had a farm - ee-i-ee-i-o.',

        'and on that farm he had a cow - ee-i-ee-i-o.',

        'with a moo moo here and a moo moo there',

        'here a moo - there a moo - everywhere a moo moo',

        'old macdonald had a farm - ee-i-ee-i-o.' ]

Do This:

Create a solution that allows users to:

  1. Load a new song from our playlist
  2. When requested, show the title of the song you’re currently remixing
  3. Continue the above operations on demand, until the user explicitly quits your program.
  4. Note that there is punctuation in some of the songs we've given you. When you remix a song, you should remove the punctuation (see the example reverse below). If you are unable to perform the remix, do NOT remove any punctuation - leave the song in its current state (see the last example below). Of course, if the song has already been altered, the "current state" has no punctuation anyway, so there's no punctuation alteration you would perform anyway.

We will be performing both unit-testing of your solution AND some whole-system tests as well. For unit tests, you must provide the following function in remix_master.py:

  • load_song(selection: int) -> list
    This function takes an integer (which is an index into our playlist) and returns a list that contains the selected song AND a string which represents the song title from our playlist. For the list returned: the song must be placed in index 0 and the title must be placed in index 1. If the selection is not valid, this function returns an empty list.
    Important Note: This function is mapped to the user-centered selection operation, NOT our computer science index scheme. Therefore, load_song(1) retrieves the FIRST song in our playlist, not the second song.
    PRE: This function's input parameters must be integers. Input values are NOT guaranteed to be within the range of our playlist
    POST: If selection is found in the playlist, a list containing the song and the song title will be returned. Otherwise an empty list will be returned

Example screen captures are below. 

 

Note that if you try to substitute a new word for a song and the song cannot be remixed, you should leave the current version untouched.

  • For your development effort, I’m giving you 3 songs for my playlist. Do NOT hard-code your solution based on these 3 songs!!! During our testing of your solution, we will expand the playlist to more than the three original songs. Your solution should be flexible enough to handle any sized playlist that has at least 1 song in it. So, if my test playlist has 7 songs in it, your solution should still work properly.
  • Focus on good procedural decomposition where each of your functions are short (<15 lines of code, discounting comments) and doing 1 thing well (NB: Your main() can be a bit longer than 15 lines, if your user menu is being handled there).
  • No global variables (Global CONSTANTS are okay)
  • Stretch-goal (try your best on this): Work to see if you can design your solution with a good "separation of concerns". See if you can construct your code for the user-interface to deal primarily with those aspects (e.g. getting input from the user and printing to the screen) and the other "business logic" to work without intermingling print statements, etc.
ReMix-Master:
L: Load a different song
T: Title of current song
S: Substitute a word
P: Playback your song
R: Reverse it!
X: Reset to original song
Q: Quit?
Your choice: t
You are mixing the song: Old MacDonald
ReMix-Master:
L: Load a different song
T: Title of current song
S: Substitute a word
P: Playback your song
R: Reverse it!
X: Reset to original song
Q: Quit?
Your choice: s
Transcribed Image Text:ReMix-Master: L: Load a different song T: Title of current song S: Substitute a word P: Playback your song R: Reverse it! X: Reset to original song Q: Quit? Your choice: t You are mixing the song: Old MacDonald ReMix-Master: L: Load a different song T: Title of current song S: Substitute a word P: Playback your song R: Reverse it! X: Reset to original song Q: Quit? Your choice: s
What word do you want to replace in the existing song? old
What new word do you want to use for the song? young
ReMix-Master:
L: Load a different song
T: Title of current song
S: Substitute a word
P: Playback your song
R: Reverse it!
X: Reset to original song
Q: Quit?
Your choice: r
ReMix-Master:
L: Load a different song
T: Title of current song
S: Substitute a word
P: Playback your song
R: Reverse it!
X: Reset to original song
Q: Quit?
Your choice: p
Turn up the 808's and drop the beat! Here's your remix:
ee-i-ee-i-o - farm a had macdonald young
ее-i-ее-i-о
cow a had he farm that on and
there moo moo a and here moo moo a with
moo moo a everywhere
ee-i-ee-i-o – farm a had macdonald young
|-カーカーカークークークークークー』ーク-』ー』ークークー』ー』ークークークー』
moo a there
moo a here
Transcribed Image Text:What word do you want to replace in the existing song? old What new word do you want to use for the song? young ReMix-Master: L: Load a different song T: Title of current song S: Substitute a word P: Playback your song R: Reverse it! X: Reset to original song Q: Quit? Your choice: r ReMix-Master: L: Load a different song T: Title of current song S: Substitute a word P: Playback your song R: Reverse it! X: Reset to original song Q: Quit? Your choice: p Turn up the 808's and drop the beat! Here's your remix: ee-i-ee-i-o - farm a had macdonald young ее-i-ее-i-о cow a had he farm that on and there moo moo a and here moo moo a with moo moo a everywhere ee-i-ee-i-o – farm a had macdonald young |-カーカーカークークークークークー』ーク-』ー』ークークー』ー』ークークークー』 moo a there moo a here
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY