+1 (951) 902-6107 info@platinumressays.com

Your custom Assignment is Just a Click Away

We Write Custom Academic Papers

From as Little as $10

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

CS 152 Park University Unit 6 Health No Head Standalone Python Code Project

CS 152 Park University Unit 6 Health No Head Standalone Python Code Project

Question Description

Introduction

This assignment lets you practice with reading from a file and manipulating lists.

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.

  1. Download the following all to the same folder:
    1. The program Lab9-start.py
    2. The data files health-no-head-sample.csv and 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']
      ...
  2. Make sure that you get output like this before starting the assignment or writing any additional code.

Directions

Modify the program in the following ways:

  1. 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.

  2. 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.

  3. 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

  4. Change the open statement in the program to use the full data set, health-no-head.csv.
  5. Write down the answers to the following queries:
    1. How many cases of Hepatitis A were reported in Utah in 2001?
    2. How many cases of polio have been reported in California?
    3. How many cases of all diseases were reported in 1956?
  6. 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.
  7. 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

  1. Submit the file with .py extension.
  2. Write a reflection in the comment box answering the following questions:
    1. Show the answers from Step 5.
    2. Describe your added feature from Step 6. Show the code that accomplishes this.
    3. In a sentence or two, what did you learn?
    4. In a sentence or two, what did you like about this project?
    5. In a sentence or two, what did you find confusing or would like to see done differently regarding this project?
    6. 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?

Rubric

Unit 6: Assignment 2 Rubric

Unit 6: Assignment 2 Rubric

Criteria Ratings Pts

This criterion is linked to a Learning OutcomeCommenting

3.0 pts

Full Credit

All required comments are present

2.0 pts

Partial Credit

Most, but not all comments are present

0.0 pts

No Credit

Few or no additional comments

3.0 pts

This criterion is linked to a Learning OutcomePrints table header and summary

4.0 pts

Full Credit

Prints table header and summary in neat columns

2.0 pts

Partial Credit

Prints header or summary neatly

0.0 pts

No Credit

Omits header and summary data

4.0 pts

This criterion is linked to a Learning OutcomePrints data in neat columns, with comma formatting for number column

4.0 pts

Full Credit

Prints data in neat columns, with comma formatting for number column

2.0 pts

Partial Credit

Prints data in neat columns, but without comma formatting

0.0 pts

No Credit

Does not print data in neat columns

4.0 pts

This criterion is linked to a Learning OutcomeInput filters

3.0 pts

Full Credit

Prompts for state, disease and year and uses as a filter

1.0 pts

Partial Credit

Prompts for state, disease or year and uses as a filter

0.0 pts

No Credit

Doesn’t prompt or filter

3.0 pts

This criterion is linked to a Learning OutcomeEmpty input filter

3.0 pts

Full Credit

Allows empty input to be a wildcard match.

0.0 pts

No Credit

Wildcard match doesn’t work

3.0 pts

This criterion is linked to a Learning OutcomeNew functionality

3.0 pts

Full Credit

Adds relevant new feature to program

1.0 pts

Partial Credit

Adds trivial new feature to program

0.0 pts

No Credit

No new feature

3.0 pts

This criterion is linked to a Learning OutcomeReflection questions

5.0 pts

Full Credit

Answers all reflection questions

3.0 pts

Partial Credit

Answers 2-5 reflection questions

0.0 pts

No Credit

Answers less than two reflection questions

5.0 pts

Total Points: 25.0

How to Place an Order

  1. Clіck оn the Place оrder tab at the tоp menu оr “Order Nоw іcоn at the bоttоm, and a new page wіll appear wіth an оrder fоrm tо be fіlled.
  2. Fіll іn yоur paper’s іnfоrmatіоn and clіck “PRІCE CALCULATІОN” at the bоttоm tо calculate yоur оrder prіce.
  3. Fіll іn yоur paper’s academіc level, deadlіne and the requіred number оf pages frоm the drоp-dоwn menus.
  4. Clіck “FІNAL STEP” tо enter yоur regіstratіоn detaіls and get an accоunt wіth us fоr recоrd keepіng.
  5. Clіck оn “PRОCEED TО CHECKОUT” at the bоttоm оf the page.
  6. Frоm there, the payment sectіоns wіll shоw, fоllоw the guіded payment prоcess, and yоur оrder wіll be avaіlable fоr оur wrіtіng team tо wоrk оn іt.

Nоte, оnce lоgged іntо yоur accоunt; yоu can clіck оn the “Pendіng” buttоn at the left sіdebar tо navіgate, make changes, make payments, add іnstructіоns оr uplоad fіles fоr the оrder created. e.g., оnce lоgged іn, clіck оn “Pendіng” and a “pay” оptіоn wіll appear оn the far rіght оf the оrder yоu created, clіck оn pay then clіck оn the “Checkоut” оptіоn at the next page that appears, and yоu wіll be able tо cоmplete the payment.

Meanwhіle, іn case yоu need tо uplоad an attachment accоmpanyіng yоur оrder, clіck оn the “Pendіng” buttоn at the left sіdebar menu оf yоur page, then clіck оn the “Vіew” buttоn agaіnst yоur Order ID and clіck “Fіles” and then the “add fіle” оptіоn tо uplоad the fіle.

Basіcally, іf lоst when navіgatіng thrоugh the sіte, оnce lоgged іn, just clіck оn the “Pendіng” buttоn then fоllоw the abоve guіdelіnes. оtherwіse, cоntact suppоrt thrоugh оur chat at the bоttоm rіght cоrner

NB

Payment Prоcess

By clіckіng ‘PRОCEED TО CHECKОUT’ yоu wіll be lоgged іn tо yоur accоunt autоmatіcally where yоu can vіew yоur оrder detaіls. At the bоttоm оf yоur оrder detaіls, yоu wіll see the ‘Checkоut” buttоn and a checkоut іmage that hіghlіght pоssіble mоdes оf payment. Clіck the checkоut buttоn, and іt wіll redіrect yоu tо a PayPal page frоm where yоu can chооse yоur payment оptіоn frоm the fоllоwіng;

  1. Pay wіth my PayPal accоunt‘– select thіs оptіоn іf yоu have a PayPal accоunt.
  2. Pay wіth a debіt оr credіt card’ or ‘Guest Checkout’ – select thіs оptіоn tо pay usіng yоur debіt оr credіt card іf yоu dоn’t have a PayPal accоunt.
  3. Dо nоt fоrget tо make payment sо that the оrder can be vіsіble tо оur experts/tutоrs/wrіters.

Regards,

Custоmer Suppоrt

Order Solution Now