Question: please use python to solve the the problem.Thank you.We are going to write a program to compute a type of population balance problem similar to
please use python to solve the the problem.Thank you.We are going to write a program to compute a type of population balance problem similar to the bunnies and foxes you computed in Lab 3. This problem will have bears, berry fields and tourists. We will just use the word berries to mean the area of the berry fields. We will count the numbers of bears and tourists as well. Bears need a lot of berries to survive and get ready for winter. So the area of berry fields is very important part to their population. Berry fields in general spread over time, but if they are trampled too heavily by bears, then they may stop growing and may reduce in size. Tourists are the worst enemy of bears, often habituating them to humans and causing aggressive behavior. Sadly, this can lead to bears being killed to avoid risk to human life. Here is how the population of each group is linked to one another from one year to the next. Suppose the variable bears stores the number of bears in a given year and berries stores the area of the berry fields. The number of tourists in a given year is determined as follows. If there are less than 4 or more than 15 bears, there are no tourists. It is either not interesting enough or too dangerous for them. In other cases, there are 10,000 tourists for each bear up to and including 10 and then 20,000 tourists for each additional bear. It is a great idea to write a function for computing tourists and test it separately. The number of bears and berries in the next year is determined by the following formulas given the population of bears, berries and tourists in the given year: bears_next = berries/(50*(bears+1)) + bears*0.60 - (math.log(1+tourists,10)*0.1) berries_next = (berries*1.5) - (bears+1)*(berries/14) - \ (math.log(1+tourists,10)*0.05) Remember none of these values can end up being negative. Negative values should be clipped to zero. Also, bears and tourists are integers. The log function is in the math module. You must write a function that takes as input bears, berries and tourists, and returns the next years bear and berry populations as a tuple. >>> find_next(5,1000,40000) (5, 1071.1984678861438) Problem Specification. Write a program that reads two values, the current population of bears and the area of berry fields. Your program then finds and prints the population of all three groups (bears, berries, tourists) for this year 1 and the next 9 years (10 years total) and prints this information. You must use a loop to do this. Once completed, your program should output: the smallest and largest values of the population of bears, berries and tourists reached in your computation. The following is an example output of your program (values separated by a single TAB):
Number of bears => 5
5
Size of berry area => 200
200
Year Bears Berries Tourists
1 5 200.0 50000
2 3 214.1 0
3 2 259.9 0
4 2 334.2 0
5 3 429.7 0
6 3 521.7 0
7 4 633.5 40000
8 4 723.8 40000
9 4 827.0 40000
10 5 944.9 50000
Min: 2 200.0 0
Max: 5 944.9 50000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
