Esempio n. 1
0
from c1 import Student

student = Student('afs', 2)
student.print_file()
student.do_homework()
Esempio n. 2
0
"""  """
from c1 import Student


#实例化
student = Student('tony','男',18)
print(student.print_file())
#由此可见__init__方法在实例化对象执行时可以自动调用构造函数,并且可以被显示调用
Esempio n. 3
0
from c1 import Student
stu = Student()
stu.print_file()
Esempio n. 4
0
from c1 import Student

zhangsan = Student()
zhangsan.print_file()
Esempio n. 5
0
from c1 import Student

s = Student()
s.print_file()