jeudi 9 mars 2023

Increase the probability of death with age using Pyhton

Using OOP I want to generate a definition in a class which increase the probability of death every year after the 45 years old and no one can live more than 90 years.

It means that after your birthday 45 the probability of death will increase every year and the oldes age to die is 90.

I tried some functions importing "random", but it creates probabilities randomly every year after the 45 and not in an increasing probability way.

The main idea is that as older you are the probability to die should increse after the 45 years and must be 100% at the age of 90.




Aucun commentaire:

Enregistrer un commentaire