class Rectangle:
'''
* Define a constructor which expects two parameters width and height here.
'''
# write your code here
def __init__(self, width, height):
self.width = width
self.height = height
'''
* Define a public method `getArea` which can calculate the area of the
* rectangle and return.
'''
# write your code here
def getArea(self):
return(self.width*self.height)Python, LintCode, 454. 矩阵面积
最新推荐文章于 2026-08-03 14:15:46 发布

307

被折叠的 条评论
为什么被折叠?



