changeGrade
is an operator for grade values.
changeGrade(grade, delta)
a string containing the current grade in the form G?
, where ?
is a number.
a number containing the relative change in grade to apply. 0
retains the current grade as-is.
a string containing the new grade.
changeGrade("G4", 0) ## G4
changeGrade("G4", 1) ## G5
changeGrade("G4", -1) ## G3
changeGrade("G10", 1) ## G11