0
Someone help me with intermidiate python 22.1
class Shape: def __init__(self, w, h): self.width = w self.height = h def area(self): print(self.width*self.height) class Rectangle(Shape): #your code goes here def area (self,self.w,self.h): area = self.w * self.h return area w = int(input()) h = int(input()) r = Rectangle(w, h) r.area() r.perimeter()
3 Réponses
0
in area() you need to return height*width not print it
0
You haven't defined perimeter.
- 2
Yeah I don't understand what to do next explain and give me the code for better understanding and plz do be stereotyping person or ill5play stereo love