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, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Which type of cloud computing offers easily accessible software and applications on the machines
Answers: 1
You know the right answer?
Computer Information Systems 2020 – 2021

Senior Final

Due 5/19/2021
Questions
question
Mathematics, 22.09.2021 03:30
question
Chemistry, 22.09.2021 03:30