[Tutor] Program help
Mats Wichmann
mats at wichmann.us
Thu Oct 22 18:43:56 EDT 2020
On 10/22/20 11:02 AM, Garrett Phelps wrote:
> Perhaps someone can help me write this code:
We can... but since it looks like homework, we won't write it *for* you.
Out of these things, what do you know how to do? What is proving
problematic?
>
> 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
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list