Grade (2)

Write a function @grade(s)@ that given a float score ss such that 0s100\le s \le 10 returns the grade string that corresponds to ss. The result of the function has to stick to the catalan grading rules: when ss is less than 55 the grade is ’suspens’, when ss is at least 55 but less than 77 the grade is ’aprovat’, when ss is at least 77 but less than 99 is ’notable’, when ss is at least 99 but less than 1010 is ’excel.lent’ —note that the dot is the usual one— and finally, if ss is 1010 the grade is ’MH’.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T16:46:33.555Z

© Jutge.org, 2006–2026.
https://jutge.org