How would you react as a professor if a student has been going to your office hours and does not perform well on an exam? Say if a student goes to the professor's office hours to get help on class material and homeworks. Then, on test day, the student does not perform well on the test, and turns in the test with some questions not completed in a one hour time period. How would you react and grade as a professor?
The grade wouldn't be affected. The student's performance is their own. I would worry a bit about my effectiveness, and I would probably modify my approach with them in future visits. In particular, I would try to get them to do more exercises to support their learning. In some cases I would suggest a tutoring center if such is available. And there is always the possibility of an undiagnosed learning difficulty that might require specialized professional help. 

But you don't say whose perspective this is. If you are asking as a student, then I suggest that you keep going back for more and following whatever advice you get. 

But if you are asking as the instructor, then it is more complicated. It is a temptation for new teachers to say more in response to a question than is, perhaps, ideal. Sometimes the best answer to a student's question is a very minimal answer so that they are led to their own insights. A hint, not an answer. Or even a new exercise that will lead them to the insight. 

Students too often get the idea that a professor asks questions because they want/need the answers. What they want, actually, is a change in the student's way of thinking and it is the search for the answer not the answer itself that is normally required to get that insight. 

Students can, of course, get frustrated if you don't answer their questions. It can be a subtle dance. But sometimes responding to a question with another question can actually get the job done better than providing the answer. 

But none of the student-instructor interactions or "extra" help should result in changing grades. The students still need to perform their part of the dance. 

I've had to spend a great deal of time with a few students. Initially they stumbled and fell. But sometimes they got over the hurdles that they faced and did well. But it was their work that did it.