Write a Python script that contains 2 functions.
Write a function complete_list_with_max_timepoint that converts a string into a list and further extends this list.
The function takes a string as an input argument:
““populationName, initialSize, growthRate, carryingCapacity”
This string is converted by the function into a list in the following format:
[populationName, InitialSize, growthRate, carryingCapacity]
Add the following two elements to the list, using a second function calculate_time_to_percentage_carryingCapacity:
a. The time point at which 99% of the carrying capacity is reached
b. The corresponding number
Assumption: The population experiences limited growth.
\[N_t = \frac{K}{1 + (\frac{K}{N_0}-1)* e^{-r*t}}\]Data elephants: [7806, 0.039, 50000, 162, 49517]
>>> complete_list_with_max_timepoint('elephants,7608,0.039,50000')
> Data elephants: [7806, 0.039, 50000, 162, 49502]
>>> complete_list_with_max_timepoint('Giraffes,5603,0.026,6000')
> Data giraffes: [5603, 0.026, 6000, 75, 5940]
>>> complete_list_with_max_timepoint('lions,5003,0.030,10000')
> Data lions: [5003, 0.03, 10000, 154, 9902]