Help with Unit 5 Lab 2 Simulations

I am having a hard time figuring out what I am supposed to do with this problem. Any advice is appreciated. Thanks!

  1. Write a simulation that will:
    -take 3 inputs: the population size, the percentage of the population initially infected, and the speed at which the simulated people should be moving around.
    -Infect a healthy person when they touch a sick person.
    -When the entire population becomes sick, stop the an9imation and report the duration of the outbreak.

Hi, welcome to the forum!

So, the third bullet says "report the duration," so you're writing a reporter, and the first bullet says it takes three inputs:
preloaded libraries script pic
You're going to make a bunch of clones of a sprite, put them at random positions, and have them walk around randomly. When two clones touch, if one is infected, the other one gets infected too.

In this simplified simulation, nobody gets cured and nobody dies, so eventually everyone will get sick, and then you report how long that took.

If that's not enough to get you started, ask a more specific question.

Thanks! Do you know how to make a sprite change color when it touches another sprite?

I do, and so do you. Remember how to make Alonzo switch costumes when you click him? Same idea, but it's a different event to check for.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.