定义类如下class Hello(): def __init__(self,name) self.name=name def showInfo(self): print(self.name)下面代码能正常执行的()
选项:
A:h = Hello(‘admin’)
B:h = Helloh.showInfo()
C:h = Hello(‘张三’)h.showInfo()
D:h = Hello()h.showInfo(‘张三’)
发布时间:2024-05-22 10:45:42