ITP-150-Assignment - Input JSON & Output CSV - Instructions Preparation Needed: Use your songs.json. If you did this correctly, then these should be present: o The outermost entity must be a dictionary o The outer dictionary contains a list of songs o Each song is a dictionary. o You have added one key/value pair to each song. Each song must have this same key. Examples: genre, album, rating, or other. Program Requirements Follow the video provided to create this program. Feel free to change the code in any way. The program must: Contain multiple functions. One of the functions must be a main function. At the bottom of the file, have a call to main - this will "kick-off" the program. The main function will call the other functions. The program will do the following tasks: Read in your input JSON file. o Handle exception if file is not found. If file is not found, print user-friendly message and naturally complete the program (don't just quit the program) Read the data from the input file and display these as list of songs to choose from. Create a playlist variable that is a list data type. Allow the user to choose from the list of songs. Allow user to choose another song, which can be done in a loop. Give the user some kind of an option to allow them to quit selecting. As user chooses each song, append it to the playlist. Once the user is done building the playlist, write the list to an output file. o Output file must be a CSV. o Make sure that the CSV contains a header row. Use the "w" file mode, so that it overwrites the CSV file if it already exists. Note that the output from your program is a CSV file. You can open up your CSV file with Excel.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
"song1": { "genre": "g1", "album": "a1", "rating": "r1", "other": "some data1" The songs.json }, "song2": { "genre": "g2", "album":"a2", "rating": "r2", "other": "some data2" }, "song3": { "genre": "g3", "album": "a3", "rating": "r3", "other": "some data3" }, "song4": { "genre": "g4", "album":"a4", "rating": "r4", "other": "some data4" } }
ITP-150-Assignment - Input JSON & Output CSV - Instructions
Preparation Needed:
Use your songs.json. If you did this correctly, then these should be present:
o The outermost entity must be a dictionary
o The outer dictionary contains a list of songs
o Each song is a dictionary.
o You have added one key/value pair to each song. Each song must have this
same key. Examples: genre, album, rating, or other.
Program Requirements
Follow the video provided to create this program.
Feel free to change the code in any way. The program must:
Contain multiple functions. One of the functions must be a main function. At the
bottom of the file, have a call to main - this will "kick-off" the program. The main
function will call the other functions.
The program will do the following tasks:
Read in your input JSON file.
o Handle exception if file is not found. If file is not found, print user-friendly
message and naturally complete the program (don't just quit the program)
Read the data from the input file and display these as list of songs to choose from.
Create a playlist variable that is a list data type.
Allow the user to choose from the list of songs. Allow user to choose another song,
which can be done in a loop. Give the user some kind of an option to allow them to
quit selecting. As user chooses each song, append it to the playlist.
Once the user is done building the playlist, write the list to an output file.
o Output file must be a CSV.
o Make sure that the CSV contains a header row.
Use the "w" file mode, so that it overwrites the CSV file if it already exists.
Note that the output from your program is a CSV file. You can open up your CSV file
with Excel.
Transcribed Image Text:ITP-150-Assignment - Input JSON & Output CSV - Instructions Preparation Needed: Use your songs.json. If you did this correctly, then these should be present: o The outermost entity must be a dictionary o The outer dictionary contains a list of songs o Each song is a dictionary. o You have added one key/value pair to each song. Each song must have this same key. Examples: genre, album, rating, or other. Program Requirements Follow the video provided to create this program. Feel free to change the code in any way. The program must: Contain multiple functions. One of the functions must be a main function. At the bottom of the file, have a call to main - this will "kick-off" the program. The main function will call the other functions. The program will do the following tasks: Read in your input JSON file. o Handle exception if file is not found. If file is not found, print user-friendly message and naturally complete the program (don't just quit the program) Read the data from the input file and display these as list of songs to choose from. Create a playlist variable that is a list data type. Allow the user to choose from the list of songs. Allow user to choose another song, which can be done in a loop. Give the user some kind of an option to allow them to quit selecting. As user chooses each song, append it to the playlist. Once the user is done building the playlist, write the list to an output file. o Output file must be a CSV. o Make sure that the CSV contains a header row. Use the "w" file mode, so that it overwrites the CSV file if it already exists. Note that the output from your program is a CSV file. You can open up your CSV file with Excel.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education