

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Exponents
incomplete
2: Exponent Quiz
incomplete
3: Exponents Grow
incomplete
4: Non-Linear Growth
incomplete
5: Logarithms
incomplete
6: Logarithm Quiz
incomplete
7: Factorials
incomplete
8: Factorial Quiz
incomplete
9: Exponential Decay
incomplete
10: Logarithmic Scale
incomplete
11: Mean and Median
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In physics, exponential decay is a process where a quantity decreases over time at a rate proportional to its current value.
We've found that LockedIn influencers tend to lose followers similarly. This means that the more followers you have, the faster you lose them.
Complete the decayed_followers function.
It calculates the final value of a quantity after a certain time has passed, given its initial value and a rate of decay. Return the remaining followers.
remaining_total = quantity * ( retention_rate ^ time )
The retention_rate is the opposite of fraction_lost_daily. If an influencer lost 0.2 (or 20%) of their followers each day, then the retention rate would be 0.8 (or 80%).
With these parameters:
initial_followers = 100fraction_lost_daily = 0.5Then we expect these results:
100 followers50 followers25 followers12.5 followers (rounded down)This isn't the exact formula shown on Wikipedia, but it's the same idea.