第41724题 单选题
下面代码在 main() 中有一行会导致错误,请找出来( )。
class Student:
    def __init__(self, n, s):
        self.__name = n
        self.__score = s

    def get_name(self):
        return self.__name

    def set_score(self, s):
        self.__score = s

if __name__ == '__main__':
    stu = Student("Tom", 85)
    print(stu.get_name()) # ①
    stu.set_score(90) # ②
    print(stu.__score) # ③
    print(stu.get_name()) # ④
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析