Coding Python Program Worksheet

Need help with the below:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Write a python program to read the file, and produce a summary of the total reported crimes for each state. The report will look something like this, though don’t worry if your list is not in alphabetical order:

State Reported Crimes Alabama 8,133,055Alaska 1,198,047…Wyoming 834,588United States 563,841,249

There are a lot of fields in the data file, but you can simplify your life by using subtotal fields, Totals.Property.All and Totals.Violent.All.

Once you have the summary, change your program so it writes the summary to a file, crime_summary.txt.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Make sure you use a dictionary for this assignment. The obvious case is to use a key of state names and the value is the accumulated count of reported crimes. There might be a place for another dictionary as well, though you only need to use one.

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

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER