If I have sex before a pap smear test, will I get dysplasia?

Maybe. Dysplasia (precancerous changes in the cervix) is most often caused by hpv virus infection. Having sex with a man who carries hpv can cause this. Most women have been exposed to some type of hpv virus if they have ever been sexually active. In young women with mild dysplasia, their immune system usually fights off the hpv infection and their pap smear becomes normal within 2 years.
No. Sex itself does not cause an abnormal pap smear or dysplasia. However sexually transmitted viruses (hpv) are associated with cervical dysplasia and cervical cancer. So sex can indirectly lead to the abnormal pap.