[Tutor] Program help
Garrett Phelps
gmphelps at ualr.edu
Thu Oct 22 13:02:21 EDT 2020
Perhaps someone can help me write this code:
The USPopulation.txt file contains the midyear population of United States,
in thousands, during the years 1950 through 1990. The first line in the
file contains the population for 1950, the second line contains the
population for 1951, and so forth. Create an application that reads the
file's contents into a list. The application should do the following:
- (15 points) Read the file into an list of integers (multiply by 1000)
- Iterate through the array and display:
- (10 points) Year
- Population
- (10 points) Change from previous year (subtract current year minus
previous year)
- (10 points) Percent change in population over last year (change in
population divided by previous year population)
- When complete, display the following based on the changes in
population (not changes in percent):
- (10 points) Average Population Change
- (10 points) Minimum Population Change and Year
- (10 points) Maximum Population Change and Year
Best Regards,
Garrett Phelps
More information about the Tutor
mailing list