Philosophy 1: Never drop a course, do your best, and take what comes at the end. If worse comes to worst, you repeat the course.
Philosophy 2: Try to avoid bad grades. If you think you might end up with an unacceptable course grade for the semester, you cut your losses early and drop the course.
In any case, there might be valid personal reasons for you to drop the
if you are not making satisfactory progress, or
if you feel you are not learning much, or
if you don't have time to properly prepare for the exams,
then you should probably drop the course.
But before you take such a drastic step, you should figure out several projected grades for yourself -- based on both pessimistic and optimistic estimates of your remaining exam grades in the course.