Actually, that grade I mentioned is so far the best I got since I started uni (and actually, the best since I was 14). And technically, I never passed the math course of the last year of highschool, I got a 4.something and they put me a 5 because they thought I was good enough to go to uni, though technically I should have repeated that course (which means an entire year lost). I'm not a good student, never been, never will be, and my grades are usually 6 out of ten, and more than once I suffered by getting a 5.0 or a 5.1 in the last moment. I think I will fail (maybe) the last one of my subjects this trimester, the one that almost half the class have dropped already. Honestly, I'm highly disappointed in myself for this, my attitude towards life in general has been getting worse and worse every day for some reasons that don't matter now.
The thing is, don't worry if you're not getting the grades you expected. What really matters is that you are actually learning what you're supposed to learn and then passing, if not the first time, at least as soon as you can. But always remember that what matter is the knowledge, not the grades.