You will write three functions that use the half-life.
The idea. After a time the amount left is the start amount times to the power . A table of readings gives the half-life: take the background away, then find the time that the corrected rate takes to halve.
Your tasks.
remaining, return the amount left after time when the half-life is half_life.number_of_half_lives, return how many half-lives take initial down to final. Use math.log2.half_life_from_table, return the half-life from lists of times and rates, with a background to subtract. Return the first time at which the corrected rate is at most half of the first corrected rate.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…