Should I drop an AP class I have a bad grade in if I know I will get a 5 on the exam?

Right now I take AP Computer Science A after school and because I go to a magnet school I play sports at a different high school and this has in turn affected my grade. The first marking period I barely passed. I’ve taken practice tests for the AP exam and I’m fairly confident I can ace it. Should I stay in the class because colleges would like to see difficult courses on your transcript in expense of my GPA or drop the course and pursue only the 5 on the exam?

You earlier said that you had a “poor” freshman year with a 3.96 WGPA, so that begs the question: What is your definition of “barely passed”? If your definition is the standard definition of receiving a D, then yes you should drop it if you do not think you can bring it up. Colleges do not want you to take difficult courses if you are in danger of failing the class.

I do believe I can bring it up but only maybe to a B-. So I was wondering if the top colleges would rather I have APCSA on my transcript or a slightly better GPA.

I would say that you could keep it on your transcript as if you get a 5 on the exam, admissions officers will probably realize that the class at your school was more rigorous than the AP test. Getting a 5 usually indicates you are proficient at Computer Science A anyways.

Like @skieurope said, your definition of fail is very ambiguous. Does it mean you got a D, or does it mean you got a B? It’s hard to tell you anything without knowing what you mean by that.

If your grade is in the B range, then you should continue. One B will not be keep you out of a top college; there are many factors that come into play. Top colleges routinely reject applicants with 4.0/36/1600 states while accepting some with lower stats.

I would also suggest, for the future, that you use adjectives that accurately describe your situation. “Bad grade” and “barely passed” when referencing a B- strikes me as disingenuous at best. Good luck.