Python程序设计——AI辅助编程习题答案 第九章.docx

Python程序设计——AI辅助编程习题答案 第九章.docx

1.

classRectangle:

def__init__(self,height,width):

self.height=height

self.width=width

defarea(self):

returnself.height*self.width

rectangle=Rectangle(5,10)

area=rectangle.area()

print(矩形的面积为:,area)

2.

classRectangle:

def__init__(self,h

文档评论(0)

1亿VIP精品文档

相关文档