Homework6: datatype grade and fun percent2grade