class  Person
   num = 0                         #
   def _ _init_ _(self,str,n,w)           #캯
       self.name = str                  #ʵԣԱ
       self.age = n                  
       self._ _weight = w               #˽_ _weight
       Person.num += 1
   def  _ _outputWeight(self)          #˽зoutputWeight()
	   print(أ,self._ _weight)     #˽_ _weight
   def  PrintName(self):
       print(,self.name,䣺,self.age,end=)
       self.outputWeight()              #˽зoutputWeight()
   def  PrintNum(self):                #幫зԱ
       print(Person.num)               #ԣԲдself.num
   @ staticmethod
   def  getNum(self):                  #徲̬getNum()
       return Person.num

#
P1 = Person(ëʦ,42,120)
P2 = Person(ʦ,39,80)
#P1.outputWeight()                     #Person object has no attribute outputWeight
P1.PrintName()
P2.PrintName()                        # Person.PrintName(P2)
print(Person.getNum())
print(P1.getNum())

ϳнΪ
ëʦ    䣺42     أ120
ʦ    䣺39     أ80
2
2