How to add a grade

I would like to add a grade like that in the corner, what is the code?