Create Calculate_grade

This function will calculate the grade of all subjects