For this assignment, you need to modify the program you created in the While Loops Assignment and reorganize your submission to eliminate redundant code. promote code re-use, and use functions to gather each piece of data.

Homework problems:

Problem 1:

Write a function that accepts the name of your favorite radio station and prints a message saying something like "Let me tune in ."

Then, ask the user for their favorite radio station and store the inputted value in a variable. Call the function you wrote above and pass the value that was inputted.

Problem 2:

Write a function called "print_business_cards" that accepts name, quantity, and tag line information as parameters. The function should print out a message stating how many business cards you are printing, who they are for, and the tag line that will appear on each card.

Call the function three times passing different arguments to it.

Problem 3:

Re-write the function in problem 2 so that the default quantity of business cards ordered by default is 100. Call the re-written function twice, once by passing a quantity of 150 and once by not passing quantity information.

Problem 4:

Write a function that accepts song information, specifically song title and artist. Make the default artist set to "Unknown" by default. This function should return a formatted string that looks like this: " by ."

Call the function you just created three times. Make sure that at least one of the times, you don't pass artist information. Print out the result you get from each function.

Problem 5:

Modify the program you created in problem 4 so that it returns a dictionary item in the format we've studied instead of a string.

Introduce a function that will loop through a list of dictionaries containing song information and print out each entry (note: you may not print dictionary items directly).

Next, create an empty list called "playlist" and introduce a while loop where users are asked for items to add to the playlist. Be sure to ask for artist and song information, store them as a dictionary using your function, and add them to your playlist. Be sure to include a way to break the while loop.

After a user has input all of the songs they wish to add to the playlist, pass the list to the function you wrote to print out all song entries.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.