We report computed cross sections for the elastic scattering of slow electrons by the pyrimidine bases of DNA, thymine and cytosine, and by the associated nucleosides, deoxythymidine and deoxycytidine. For the isolated bases, we carried out calculations both with and without the inclusion of polarization effects. For the nucleosides, we neglect polarization effects but estimate their influence on resonance positions by comparison with the results for the corresponding bases. Where possible, we compare our results with experiment and previous calculations.