Calculate letter grade solution