Home > other >  Please help to do a topic
Please help to do a topic

Time:10-04

Pray for a great god help me do the

CodePudding user response:

Please the big brother sisters
O the

CodePudding user response:

The class Person:
Def __init__ (self, name, gender, age) :
Self. _name=name
Self. _gender=gender
Self. _age=age

Def show (self) :
Print (" name: "+ self. _name +" \ n + "
"Gender:" + self. _gender + "\ n" +
"The age:" + STR (self. _age))

The class Student (Person) :
Def __init__ (self, name, gender, age, classes, major) :
Person. __init__ (self, name, gender, age)
Self. _classes=classes
Self. _major=major

Def show (self) :
Print (" name: "+ self. _name +" \ n + "
"Gender:" + self. _gender + "\ n" +
"The age:" + STR (self. _age) + "\ n" +
"Class:" + self. _classes + "\ n +"
"Major:" + self. _major)

Print (" personnel information: ")
Person=person (" lisi ", "famle, 25)
Person. The show ()
Print (" \ n student information: ")
Student=student (" lisi ", "famle, 25," dayi ", "jisuanji")
Student. The show ()
  • Related