标签:logs length style blog sel self col bsp int
1 class Square: 2 def __init__(self,length): 3 self.length = length 4 5 def perimeter(self): 6 return 4*self.length 7 8 def area(self): 9 return self.length*self.length 10 11 square = Square(3) 12 print(square.perimeter()) 13 print(square.area())
标签:logs length style blog sel self col bsp int
原文地址:http://www.cnblogs.com/wangmo/p/7751338.html