Write a program that for any census year input the program

Assignment Help Python Programming
Reference no: EM132360784

Question

The census le is a text le with data for the 10-year census from 1900 to 1990 (e.g.,1900, 1910, 1920, . . . ). It has population data for each state as well as regional and overall data. Each state is on its own line, but the data are grouped so that only three decades of data are on each line|complicating the task of extracting the data. In addition, the data are further broken down into total, urban, rural, and percentages.

Write a program that for any census year input (e.g., 1970) the program will print the state and its total population with the minimum and maximum.

For example:

Enter census year 1900 to 1990: 1970

Minimum: (302853, 'Alaska')

Maximum: (19971069, 'California')

The output is displayed as a tuple as a hint to assist with solving the problem rather than illustrating readable output. Some points to consider:

(a) Begin by generating clean data: there are footnotes that need to be eliminated, numbers contain commas, some rows (lines) have data you are not interested in (e.g., region data), you are not interested in all columns (e.g., percentages), and so on. Simply printing the lines with extraneous data removed is a good start.

(b) You will likely want to combine multiple state name strings into one, e.g., New" York" becomes New York."

(c) A tuple (population, state) provides a way to tag population data with a state in a way that allows a list of tuples to be sorted (remember that by default, sorting uses the rst value).

Reference no: EM132360784

Questions Cloud

How can an organizations reduce unethical behavior : How can an organizations reduce unethical behavior? Does organizational culture impact employee behavior?
Design a business plan based on new innovative venture : BUSS1011 - Entrepreneurship and New Venture Creation - Middle East College - Oman - Business Plan - Design a business plan based on new innovative venture
Write a program that obtains two integer numbers from user : Pseudo code is basically a shorthand way of describing a computer program functions; it creates the logical structure describing the actions to execute.
Construct and animate a solution to frogs and toads puzzle : COMP332 Programming Languages Assignment - Solving the Frogs and Toads problem in Scala, Macquarie University, Australia
Write a program that for any census year input the program : Write a program that for any census year input (e.g., 1970) the program will print the state and its total population with the minimum and maximum.
Compute numbers and create a list that contains the numbers : Write a program that generates all odd numbers from 1 to n. Ask the user for n and set n in the beginning of the program. Use a while loop to compute.
Create the pseudo code from the following request : The program must have some sort of menu that allows users to make selections to do a particular calculation. It must provide five menu items that allow the user
Calculate the syndrome : what is the loss in terms of mean SNR compared with full MRC and Derive the pdf of the SNR at the output of the combiner for the given cases.
Compute the value of e using all three of the methods : Write a program that computes the value of e using all three of the methods described. Use values of 1, 2, 5, 10, 100, 1000, and 10000 for the first method.

Reviews

Write a Review

Python Programming Questions & Answers

  Create functions and call those functions to display outputs

Create additional functions and call those functions to display outputs. Write code for each function calling functions from step one above to display outputs.

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

  Create a module currency which includes the functions

You are having a problem with writhing this code. Create a module currency, which includes the following three functions that do currency conversions.

  Draw the letters xyz with straight lines using python code

Generate a Python program that uses Turtle Graphics to draw the letters "XYZ" with straight lines. Size and location somewhere reasonably in the middle.

  Write the appropriate accessor and mutator methods for each

Write two class es named ProductionWorker and ShiftSupervisor that are subclass es of the Employee class.|

  Draw a square with dimensions 50 pixels by pixels

Draw a square with dimensions 50 pixels by pixels, centered around the origin and use a for-loop in your solution.If t was the turtle that was instantiat

  Implement algorithms for sorting in python

MCD4710 Algorithmic Problem Solving - write a Python program similar to the one from Part A but sort by the total medal count instead. So instead of sorting by the number of gold medals that each team won, this time it should be sorted by the total..

  Convert hexadecimal 4c to decimal

Your first objective in this lesson is to understand binary numbers and hexadecimal numbers. Then, you must learn how to quickly and accurately convert between decimal numbers, binary numbers

  Calculate the nth power of 2 starting from 1

For the integer numbers ranging from 2 to 2n where 2n is less than 10000, please calculate and print out their total. Calculate the nth power of 2 starting.

  Display the array of names and the array of votes to provide

Write a function that accepts the name of an output file and displays the array of names and the array of votes to the provided output file.

  Draw nassishneiderman diagram

Draw NassiShneiderman (NS) diagram/s that present the steps of the algorithm required to perform the task specified

  Write a python class definition for class sumi

Write a python class definition for class ‘Sumi' with a single instance variable self.num of type ‘int' and single instance method called "sum_of_digits".

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