subject

Computer Information Systems 2020 – 2021

Senior Final

Due 5/19/2021

100 points

Students will write a file processing program. Their will be two input files given to the student and they are to produce an output to print.

The input files are: Track. txt and Genre. txt (Found in Canvas under Unit6 > Files)

open file information. When writing the open statement for both files add this to the statement(see in red)

open("Name of your file", "r", encoding="utf8")

The first line of each file contains the header information. The information will let you know what the name of the data elements are in your file. The data is separated by a pipe character “|”

Track. txt information:

This file contains information on music tracks, along with the size of the track, the length of the track, the genre of music(genre_id), composer, name of the track plus a few other fields.

Genre. txt_information:

This file contains information on the type of genre the music is plus a genre_id.

Processing:

You will read in both files in your program to process the relevant information.

Program requirements are:

identify all rows that have Milliseconds greater or equal to 500,000 and Milliseconds less than or equal to 1,000,000 from the Track file.

You will also need to read in the Genre file to identify the Genre of music for each track that met the criteria in Milliseconds (see above).

Use the Genre_id from both files to match rows of data from the Track table with rows of data from the Genre table.

You will need to determine number of tracks for each genre_id from the above Milliseconds criteria.

You will need to calculate the total and average Milliseconds for each genre_id from the above Milliseconds criteria

You will need to calculate the total and average Bytes for each genre_id from the above Milliseconds criteria

Output:

The output report will be formatted in column format and consist of the following with headers.

Genre_id, Genre Name, Number of Tracks, Ttl Milliseconds, Avg Milliseconds, Ttl Bytes, Avg Bytes

Formatting round any calculations to 2 decimal places, output should contain at the most 2 decimal locations (no more or no less) for floats.

example given of format(not actual data results)

GenreID GenreName #Tracks Ttl MS Avg MS Ttl Bytes Avg. Bytes

1 Rock 4 2500000 625000.00 11450000 2862500.00

Submission:

Student will only submit a .py file for Grading.

There is a rubric please review it.

Any programs that don’t compile successfully (ie execute without errors, program runs through its logical conclusion) will be marked zero, regardless of what code is written. So even if your program has correct logic, make sure it runs error free when you turn it in.

Please keep comments lean and tight. There should be more lines of code than lines of comments.

Remove unnecessary print statements when submitting your file.

There is no makeup date or lateness for this Final.

Helpful Hints:

Read in the track. txt file and see what your working with before doing a full fledge program. Maybe extract the records that fit the criteria for milliseconds.

Identify the output fields (ie fields going on the report) and see what files contains them.

Look at using lists and the different methods you could use (append(), sort(), pop() are ones that may be useful)

Be familiar with split(), strip() methods.

Experiment trying different coding techniques and see what the results are. Remember there is no single way to solve the problem.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, loveworld3798
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
image
Computers and Technology, 22.06.2019 12:10, drelisech6467
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
Answers: 1
image
Computers and Technology, 22.06.2019 13:30, ReaLily
1. technician a says horsepower information can be used by consumers to compare the power of different automobile engines. technician b says that manufacturers will often list the horsepower output of their engines in the online service information. who is right?
Answers: 2
image
Computers and Technology, 22.06.2019 19:30, tfaulk2884
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
You know the right answer?
Computer Information Systems 2020 – 2021

Senior Final

Due 5/19/2021

Questions in other subjects:

Konu
Health, 30.11.2020 20:30