Question: in python write a recursive method to calculate the size of a population of organisms that increases at a specified rate each day. The method

in python write a recursive method to calculate the size of a population of organisms that increases at a specified rate each day.

  • The method header is:def populatio_size(starting_population, increase_rate, number_of_days)
    • Examples:
    • starting population = 10, increase rate = 0.5, number of days = 5
    • day 1 population = 15
    • day 2 population = 22 (22.5 truncated down to 22)
    • day 3 population = 33
    • day 4 population = 49 (49.5 truncated down to 49)
    • day 5 population = 73 (73.5 truncated down to 73)
    • method returns 73
    • starting population = 2, increase rate = 1.0, number of days = 4
    • day 1 population = 4
    • day 2 population = 8
    • day 3 population = 16
    • day 4 population = 32
    • method returns 32

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!