vendredi 1 mai 2020

Cant figure out the code for population problem

Write a code to plot 1000 random positions for particles with a 5 km X 5km area. Now imagine that 100th and 500th people are carriers for disease. If another person comes in a 5m radius of these people, he/she will be infected with probability of 80%. Find out how a number of people is changing with a changing number of iterations. Plot infected people on the y-axis and no of iterations on the x-axis.




Aucun commentaire:

Enregistrer un commentaire