Population of Organisms
Write a program that will predict the size of a population of
organisms. The program should ask the user for the starting
number of organisms, their average daily population increase (as
a percentage*), and the number of days they will multiply. A loop
should display the size of the population for each day.
code should include the following functions
• function to get value for the starting number organisms
• function to get a valid value for the average daily
• function to get a valid value for the number of days
• function to calculate and print amount of increase each day.
Your code should write the output to a file. *this does not need to be a function
I will run your code to ensure the result.txt is produced
Input Validation:
Do convert increase to percentage* if user does not.
For example
Output to screen
Output file
———
Organism Population
Create a program that can forecast the size of a population.
organisms. The program should prompt the user for the start time.
number of organisms, average daily population growth (as
a percentage*), as well as the number of days in which they will multiply. A ring
should display the population size for each day
The following functions should be included in the code:
• a function that returns a value for the starting number of organisms
• function to obtain a valid value for the daily average
• function for determining a valid number of days
• a function for calculating and printing the amount of increase per day
The output of your code should be written to a file. *This does not have to be a function.
I’ll run your code to see if it works.