Calculate the average monthly private employment

Assignment Help Python Programming
Reference no: EM131099895

Programming Project

Assignment Overview

The goal of this project is to gain more practice with functions, files, exception handling, and dictionaries.

Let's tackle a political question. It is standard political dogma that Democrats "want big government" and that Republicans "create jobs." Let's see if data supports the dogma. The official source of employment statistics is the U.S. Bureau of Labor Statistics (https://www.bls.gov/data/#employment) and we have collected data for private employment and government employment. Our assumption is that if a party is creating jobs, then private employment will increase, and if a party is creating bigger government, then government employment will increase. Your job is to extract that information from the files provided.

Project Specification

There are two employment data files provided. Both have comma-separated data. Look at the headings to understand their format. Numerical values are in thousands. The data for 2015 is, of course, incomplete.

• government_employment.txt
• private_employment.txt

There is also a comma-separated file on presidents, their years, and their political party.

• presidents.txt

Since the transition from one term to another occurs partway through January, the last year listed for any president is the same as the first year of the next president. To keep things simple let's count January entirely for the incoming president. That is, in the file the last year listed for a president will not count. For example, George W. Bush's last year is listed as 2009 but he was president for only a few weeks that year so we will not count him as being president in 2009. Also, watch out for the "Jr." for President Carter when you are reading the file-there is an extra comma. Finally, we will consider only the full years for each president so for Obama we will not count any data from 2015 (especially since the data for March and April is preliminary, not final data).

1. Your program will prompt for the file names. Use exceptions to check that each file was opened without an error.

2. All president data can only come from the presidents.txt file, i.e. you cannot code specifics about presidents into your program. We will test your program using a file of that format, but with different entries, for example we may test on a file that has three of the lines of that file.

3. As an academic requirement your program must define and use two functions in a meaningful way. (Feel free to use more functions; I did.)

4. Calculate and display in columns (see sample below):

1. the average monthly private employment for each political party

2. the average monthly government employment for each political party

3. the private employment of the first month and last month of each president

4. the change in private employment from the first month to the last month of each president; report the change as both a difference and as a percentage

5. the government employment of the first month and last month of each president

6. the change in government employment from the first month to the last month of each president; report the change as both a difference and as a percentage

5. Write a paragraph on your conclusions of the validity of the political dogma that "Democrats want big government and Republicans create jobs." Refer to your program output as evidence for your conclusion. Put the paragraph in a separate document (either as proj05.txt, proj05.tex or proj05.doc) and hand it in. Feel free to be creative.

6. Order to read files (added so we can preprocess your project).

a. Read president's file
b. Read private employment file
c. Read government employment file Deliverables

proj05.py and (proj05.txt, proj05.tex or proj05.doc) - your source code solution, and your paragraph.

1. Please be sure to use the specified file names, e.g. "proj05.py"

2. You will electronically submit a copy of the file using the "handin" program: https://www.cse.msu.edu/handin/webclient

Attachment:- Attachments.rar

Reference no: EM131099895

Questions Cloud

What actions would you take to accomplish this task : Your company has given you the task of reducing inventory by 25%, without negatively impacting customer service. What actions would you take to accomplish this task?
Explain the techniques used to determine the true location : Many companies perform IP to geo-location analysis on their clients for various reasons such as marketing, interest or security. In 5 pages (no less, no more!) explain the techniques used to determine the true location of a host device on the Inte..
Director of the quality management system : 1. You have just been hired by a start-up Biologics company as the Sr. Director of the Quality Management System (QMS) and one of the many tasks you will do in your new role is establish an Audit Program.
What cost savings will be realized : The goal is to reduce costs. Identify for the class, the process within your organization that you will work to improve. What changes will you make? How will you make them? What cost savings will be realized? How will you measure your results? Pro..
Calculate the average monthly private employment : Since the transition from one term to another occurs partway through January, the last year listed for any president is the same as the first year of the next president. Calculate the average monthly private employment for each political party.
How you arrived at your answers with supporting formulas : Explain how you arrived at your answers with supporting formulas.
Combination of replaceable rules and a constitution : PREPARE a CONSTITUTION - refer to sections 134 and 135.Your company's INTERNAL MANAGEMENT is to be governed by a COMBINATION of replaceable rules and a constitution
Develop a matrix that identifies specific departmental needs : Develop a matrix that identifies specific departmental needs for a company that you are familiar with. Provide an overall total needed for the organization which will impact the ISP connection that will be needed, as well as equipment and software.
Anticipate the impact of that risk to change : Select five of the risks you identified in your Week 2 assignment and create a titled section for each of them in your paper.  Ensure that at least one of the risks you select is a positive risk (an opportunity).  In that titled section, be sure t..

Reviews

Write a Review

Python Programming Questions & Answers

  What are the issues assciated with top-down analysis

what are the issues assciated with top-down analysis please explain?

  Interaction between the customer and the machine

In Python:Simulate a cash register or ATM including the interaction between the customer and the machine (i.e. assume that you are automating the responses)

  Arithmetic progression is a sequence of numbers

An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same.

  Improve the code for the haunted house game

Improve the readability of the code by improving the function names, variables, and loops, as well as whitespace. Document these changes in your journal and define a win condition for the game, for example, collecting all items and returning to the..

  Create mini-python projects or programs

Your assignment is to create mini-Python projects or programs and to run them in the Python-IDLE environment

  Write a python program that starts from the starting state

Task consists of programming a Python implementation of a solver for the Desert Crossing Task - write a Python program that starts from the starting state.

  Evaluate quality of the random number generator in python

This program is going to evaluate the quality of the random number generator in Python by simulating dice rolls and looking at the distributions of the values.

  Create a python program that allows user enter class name

Create a Python program that allows user enter class name, faculty name, name of each student, and letter grade each student earned.

  Recursive sorts are easier to write in functional style

Recursive sorts are easier to write in functional style than others. Two recursive sorts are  Quicksort and Mergesort. Write functional versions of (a) Quicksort; (b) Mergesort in an  imperative language of your choice (e.g., C, Ada, C++, Python), us..

  Implement core security features

What you will be implementing here is inspired by real world cases such as the Conficker work. To have any chance of defeating such a threat, you need to understand how they defend themselves.

  Develop a program to solve the anteater bed problem

Develop a program to solve the Anteater Bed and Breakfast problem. Develop this code in its own BandB.py file. Pay very close attention to the instructions, especially about developing the program in incremental stages

  Which stores and manipulates times on a 24 hour clock.

Complete the class Time, which stores and manipulates times on a 24 hour clock. As specified below, write the required methods, including those needed for overloading operators. Exceptions messages should include the class and method names, and ident..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd