求大神解释,我都不知道我写的啥东西,然后就通过了?
@grade
def score(self,score):
if score>=80:
return A
elif score<=60:
return B
else:
return c
正确参考答案:
@property
def grade(self):
if self.score < 60:
return 'C'
if self.score < 80:
return 'B'
return 'A'