Menu

[Solved]Whnt Following Python Code Print Class Shapecobject Def Eq S1 S2 Return S1area 2area Def G Q37022931

canyou do it in 5 min please
Whnt does the following Python code print class ShapeCobject) def -eq..(s1, s2): return s1.area) 2.area() def ..ge..(s1, 2) rWhnt does the following Python code print class ShapeCobject) def -eq..(s1, s2): return s1.area) 2.area() def ..ge..(s1, 2) return s1.area) s2.area class Rectangle(Shape): def -init..(self,b,h): self.base int (b) self.height int Ch) return self.base self.height return ‘Rectangle with base and heightstr(self.base) str(self.height def area (self): def _.str..(self): class Triangle(Shape): def ..init..(self, b,h): self.base int(b) self.height int (h) def area (self): return 1/2 self.base self.height def ..str..(self): return ‘Triangle vith base and height str(self.base) str(self.height) def f(L): if len(L)0: return None x L[O] for s in L if sx: return x t = Triangle(4,2) r Rectangle (4,2) print (t.area)r.area )) shapes-10: Rectangle, 1: Triangle.) for i in range(5): L’ append (shapes [i %2] (1,2*1)) print (L[2]) print (f(L)) Show transcribed image text Whnt does the following Python code print class ShapeCobject) def -eq..(s1, s2): return s1.area) 2.area() def ..ge..(s1, 2) return s1.area) s2.area class Rectangle(Shape): def -init..(self,b,h): self.base int (b) self.height int Ch) return self.base self.height return ‘Rectangle with base and heightstr(self.base) str(self.height def area (self): def _.str..(self): class Triangle(Shape): def ..init..(self, b,h): self.base int(b) self.height int (h) def area (self): return 1/2 self.base self.height def ..str..(self): return ‘Triangle vith base and height str(self.base) str(self.height) def f(L): if len(L)0: return None x L[O] for s in L if sx: return x t = Triangle(4,2) r Rectangle (4,2) print (t.area)r.area )) shapes-10: Rectangle, 1: Triangle.) for i in range(5): L’ append (shapes [i %2] (1,2*1)) print (L[2]) print (f(L))

Expert Answer


Answer to Whnt does the following Python code print class ShapeCobject) def -eq..(s1, s2): return s1.area) 2.area() def ..ge..(s1,… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *