Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

APUS Computer Science Python project

APUS Computer Science Python project

APUS Computer Science Python project

Description

Preparation

This assignment must be done in a standalone Python environment, not the textbook. See the Textbooks and Materials page for instructions on installing the compiler on your local computer or using Park’s virtual desktop.

Download the following all to the same folder:

The program Lab9-start.py Download Lab9-start.py 

The data files health-no-head-sample.csv Download health-no-head-sample.csvand health-no-head.csv Download health-no-head.csv
The big data file contains records of some infectious diseases from 1928 to 2011. The  small one only includes data from 3 years from 5 states. Run the python program. It should print something like this MEASLES,206.98,COLORADO,2099,1014000,1928

[‘MEASLES’, ‘206.98’, ‘COLORADO’, ‘2099’, ‘1014000’, ‘1928n’]
MEASLES,634.95,CONNECTICUT,10014,1577000,1928

[‘MEASLES’, ‘634.95’, ‘CONNECTICUT’, ‘10014’, ‘1577000’, ‘1928n’]
MEASLES,256.02,DELAWARE,597,233000,1928

[‘MEASLES’, ‘256.02’, ‘DELAWARE’, ‘597’, ‘233000’, ‘1928n’]

  1. Make sure that you get output like this before starting the assignment or writing any additional code.

Directions

  1. Modify the program in the following ways:

Write each line as part of a table, include a header before the table, and a summary line at the end. Use a fixed width for each column (don’t try to find the largest width like you did in the previous unit). You should end up with something like State                 Disease        Number      Year

COLORADO              MEASLES         2,099      1928
CONNECTICUT           MEASLES        10,014      1928
DELAWARE              MEASLES           597      1928
…
DELAWARE              SMALLPOX            0      1930
DISTRICT OF COLUMBIA  SMALLPOX            0      1930
FLORIDA               SMALLPOX           28      1930
                     Total          52,307  
Not every field of the original line is used in the output. You will have to do some research about the .format() function to print the number of cases with a comma. If you can’t get the comma in the number column, move on and come back to that once you have more of the program written. The key is to have all the columns line up.  

Use some if statements to add three filters to your program that let the user select exactly one state, disease and year to include in the report. Prompt the user to enter these values. Enter state: Colorado
Enter disease: smallpox
Enter year: 1928
State                 Disease        Number      Year

COLORADO              SMALLPOX          340      1928
                     Total             340   
Unfortunately, this isn’t very flexible.

Change your program so that if the user just hits return for a prompt, the program includes all the data for that field. For example:
Enter state (Empty means all): Colorado
Enter disease (Empty means all):
Enter year (Empty means all): 1928
State                 Disease        Number      Year

COLORADO              MEASLES         2,099      1928
COLORADO              POLIO              71      1928
COLORADO              SMALLPOX          340      1928
                     Total           2,510    
Your program should run as expected using this small data set

Change the open statement in the program to use the full data set, health-no-head.csv.

Write down the answers to the following queries:

How many cases of Hepatitis A were reported in Utah in 2001?

How many cases of polio have been reported in California?

How many cases of all diseases were reported in 1956?

  1. Add another feature to your program.
    This could be something like printing the highest and lowest numbers for each query, or allowing the user to just type the first part of value, so that entering 20 for the year generates a table for years 2000, 2001, 2002, … 2011, or entering D for a state gives information on Delaware and the District of Columbia. Or maybe leverage your previous assignment and make the column only as wide as they need to be for the data. Try to make it something useful.

Comment your code.
Be sure to add a header comment to your program and any functions, and appropriate comments before other blocks of code.

Submission

Submit the file with .py extension.

Write a reflection in the comment box answering the following questions:

Show the answers from Step 5.

Describe your added feature from Step 6. Show the code that accomplishes this.

In a sentence or two, what did you learn?

In a sentence or two, what did you like about this project?

In a sentence or two, what did you find confusing or would like to see done differently regarding this project?

In a sentence or two, if you had another hour or two, what would you like to add to the project or how would you do things differently?

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20