If you fail the class but pass final exam do receive credit?
Generally, no. Failing a class usually means your overall grade for the course, which includes homework, quizzes, tests, and participation (in addition to the final exam), is below the passing grade. Even a perfect score on the final exam is unlikely to raise your grade enough to pass the entire course if your performance in other areas was significantly poor. The weighting of the final exam varies by course and instructor, but it rarely carries enough weight to overcome a failing grade in the rest of the course.