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. 矩阵面积
最新推荐文章于 2024-10-22 15:50:58 发布
6859

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



