Given an integer representing the initial population size i, and the yearly change in the population c (in percentages), return what the population size will be at the end of the nth year.
Example:
The initial population is 1000, and the yearly change is -10%. The population after one year is going to be 900.
Remember to round up your result, as population cannot be floating point number.
import math
def population_tracking(i, c, n):
return math.ceil(i*((1+(c/100))**(n)))
Test.assert_equals(population_tracking(1000,-10,1), 900)
Test.assert_equals(population_tracking(400,15,3), 609)
Test.assert_equals(population_tracking(500,25,4), 1221)