If life is an IQ test, then dealing with pandemics is a high-priority item. Getting the right answer may save your life, so test-taking motivation ought to be high.
At first glance, the answer is obvious: avoid ill people, and if in doubt, avoid people. That ought to do it. Stay quietly in a room until the whole thing blows over. If you have the means, that room should be guarded on either side by fires. Such was the advice the Pope received during the Great Pestilence, and following it saved his life. Not everyone can afford such luxurious protection, but the principles are clear: since there must be a means of transmission, a blazing fire is likely to consume the noxious agent, whatever it is. As for visitors, they are to be kept away, preferably in a guarded place, like the ship they came in, moored at a safe distance for forty days, the Venetian quaranta giorni which worked well to protect them. Those inland principalities which harshly confined plague victims to die with their families in their bricked-up houses were able to save their other citizens. Tough governance. Forty days in the wilderness and the whole thing is over.