From what I
googled
IS PNEUMONIA CONTAGIOUS?
Yes it is, but it is LESS contagious than most people think. The cold virus that started the cough in the first place is contagious. But the pneumonia part of the illness down in the lungs is far less contagious. People who are exposed to someone with pneumonia may catch the normal cough and cold symptoms of the virus, but usually don't progress to pneumonia. The formation of the pneumonia is not determined by the particular cold virus or bacteria that the person has, but rather by each person's susceptibility in their own lungs.
Therefore, just because someone in your house or school has pneumonia and is on antibiotics, does NOT mean everyone else in the vicinity with a cough has pneumonia. Wait and see how the illness progresses before asking your doctor for antibiotics.