Una vida media es la cantidad de tiempo que tarda en desintegrarse la mitad de una sustancia radiactiva.
Crea una función que calcule la masa restante y la cantidad de años que tardó la sustancia en desintegrarse. Recibirás:
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]