Question: Answer should be in Python. Find the line in the task3b.py stating TODO 1 . To complete TODO 1 assign the following constants with the
Answer should be in Python.
Find the line in the task3b.py stating TODO 1 . To complete TODO 1 assign the following constants with the values as indicated. - Define 5 constants for the initial populations of the fish in each pond with the following names: INIT_POP_POND_1, INIT_POP_POND_2, INIT_POP_POND_3, INIT_POP_POND_4, and INIT_POP_POND_5. Assign them with the following values: 10,25, 12,30 , and 4. - Define 5 constants for the population yearly growth rate with the following names: YEARLY_GROWTH_POND_1, YEARLY_GROWTH_POND_2, YEARLY_GROWTH_POND_3, YEARLY_GROWTH_POND_4, YEARLY_GROWTH_POND_5. ASSign them with the followin values: 2.0,1.5,1.8,2.2, and 1.5. - Define 1 constant for the number of years since the introduction of the initial population, after the passing of which we are estimating the number of fish. Name the constant YEARS. Set it to 3 . In TODO 2, you will implement the pop_after_n_years function with the init_pop, yearly_growth and parameters. The function computes the size of the population after n years, given the initial size of the population and the yearly growth rate. The general formula for a single pond is as follows: For example, a rate of 1.5 means that there would be 15 fish after 1 year if the particular pond was seeded with 10 fish.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
