Uma meia-vida é a quantidade de tempo necessária para que metade de uma substância radioativa se desintegre.
Crie uma função que calcule a massa restante e a quantidade de anos que a substância levou para se desintegrar. Você receberá:
halflife_calculator(1000, 5730, 2) ➞ [250, 11460]
# There are 2 half lives, so the mass decays from 1000 to 500, then from 500 to 250.
# Each halflife is 5730 years, and since there were 2, it took 11460 years in total.halflife_calculator(1600, 6, 3) ➞ [200, 18]
halflife_calculator(13, 500, 1) ➞ [6.5, 500]
halflife_calculator(100, 35, 5) ➞ [3.125, 175]