第28848题 单选题
已知Python类`Student`的定义如下,下列代码选项中可以正确执行并得到预期结果的是?
class Student:
    def introduce(self):
        return f"我是学生{self.name}"
A
stu = Student()
stu.name = "张三"
print(introduce())
B
stu = Student()
stu.name = "张三"
print(stu.introduce())
C
Student.introduce()
D
stu = Student()
stu.name = "张三"
print(Student.introduce())
程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析