Write a program that produces a bar chart showing the population growth of Prairieville, a small town in the Midwest, at 20-year intervals during the past 100 years.

The program should:
1. Read the population figures (rounded to the nearest 1000 people) for the years 1900, 1920, 1940, 1960, 1980, and 2000 from a file.
2. Display the date and a bar consisting of one asterisk for each 1000 people.

Example population figures: 3000, 7000, 10000, 25000, 29000, and 30000 (use the file to input the actual values).

Use a loop for the years and also for generating the asterisks for each population value.

Here is an example of how the chart might begin:

```
1900: ***
1920: *******
1940: **********
1960: *************************
1980: *****************************
2000: ******************************
```

Answer :

Final answer:

In this task, a program is created to demonstrate the population growth of a town called Prairieville using asterisks as a bar chart. The program reads population figures from a file, loops through each line (which stands for an interval of 20 years), and prints that number of asterisks to represent the population figure.

Explanation:

This is a task related to developing a program that demonstrates population growth in Prairieville. The population growth can be represented via a bar chart created in any programming language. To write this program, you would need to have skills in reading data from a file, looping through an array, and generating output in the form of text. For practical purposes, let's use Python as an example. Python is a user-friendly language well suited for this kind of task.

Consider the following Python script:

with open('population.txt', 'r') as file: year = 1900 for line in file: population = int(line)//1000 print(str(year) + ": " + "*"*population) year += 20

This script reads the figures from a file called 'population.txt', where each line represents the population of Prairieville at 20 year intervals, starting from 1900. The script then prints a string that contains the year and that number of asterisks.

Learn more about Programming here:

https://brainly.com/question/30613605

#SPJ11