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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:40
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
question
Computers and Technology, 22.06.2019 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
question
Computers and Technology, 24.06.2019 17:00
The length of time that a slide appears before automatically advancing to the next slide can be set in the timing group under the transitions tab. transition to this slide group under the transitions tab. timing group in the master slide view. transition to this slide group in the master slide view.
Answers: 1
You know the right answer?
Computer Information Systems 2020 – 2021

Senior Final

Due 5/19/2021
Questions
question
English, 30.07.2019 01:00
Questions on the website: 13722363