Gaurav Sharma
Gaurav Sharma
3,239 Points

Didnt get the right perimeter.

class Rectangle: def init(self, width, length): self.width = width self.length = length

def area(self):
    return self.width * self.length

def perimeter(self):
    return (length * 2 + width * 2)

1 Answer

Steven Parker
Steven Parker
201,355 Points

It looks like the last line is missing the "self." prefix on both attribute names.

For future questions, please use Markdown formatting on pasted code, and provide a link to the course page you are working with.