Question
Python 3 Reading From File Write a program that will read the contents of the file USPopulation.txt into a list, and calculate and display: The
Python 3 Reading From File
Write a program that will read the contents of the file USPopulation.txt into a list, and calculate and display:
The average annual change in population during the time period 1950 - 1990 (inclusive)
The year with the greatest increase in population during the time period 1950 - 1990 (inclusive)
The year with the the smallest increase in population during the time period 1950 - 1990 (inclusive)
USPopulation.txt file lists the population, in thousands, of the United States during the years 1950 - 1990 (inclusive). The first line of the file is the population in year 1950, the second line the population in the year 1951 etc. Here is what is in the file:
151868
153982
156393
158956
161884
165069
168088
171187
174149
177135
179979
182992
185771
188483
191141
193526
195576
197457
199399
201385
203984
206827
209284
211357
213342
215465
217563
219760
222095
224567
227225
229466
231664
233792
235825
237924
240133
242289
244499
246819
249623
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started