Not in high school, that was a relative breeze.
College was a different story. I failed Intro to Religion (or something like that) my first semester. Silly me, I shouldn't have scheduled an 8:00 class that I nearly never attended. Re-took it 2nd semester & got an A.
My junior year, I got a D in Intermediate Accounting II. The professor was denied tenure, and this was his last semester of teaching. He didn't even teach the damn class, he'd come in and go over problems on the overhead projector without explaining them at all. I'm not sure any of his students got an A. Retook that stupid class the next semester and got a B.