All problems
Gompertz Growth Value
Problem
The Gompertz growth model has the solution y(t) = k * exp(-b * exp(-c * t)), where k is the asymptote and b, c control the shape.
Given t, k, b, and c, return y(t).
Hint
As t grows, the inner exponential vanishes and y approaches k.
Test cases
case 1
in: [0,100,1,1]
expected: 36.787944117144235
case 2
in: [1,100,1,1]
expected: 69.22006275553464
case 3
in: [10,100,1,1]
expected: 99.99546011007988
case 4
in: [0,50,0,1]
expected: 50
Starter codePython
def gompertz_value(t, k, b, c):
# Your code here
pass4 test cases · run your code against them in the editor