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()

15th Aug 2021, 11:05 AM
Jprogsie
Jprogsie - avatar
3 Réponses
0
in area() you need to return height*width not print it
15th Aug 2021, 11:16 AM
Slick
Slick - avatar
0
You haven't defined perimeter.
15th Aug 2021, 11:18 AM
Simon Sauter
Simon Sauter - avatar
- 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
18th Aug 2021, 5:59 AM
Jprogsie
Jprogsie - avatar