PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8
class Shape:
def __init__(self, w, h,z):
self.width = w
self.height = h
self.zeight=z
def areaa(self):
return self.height*self.width
#your code goes here
def __add__(self,object2):
return Shape(self.width+object2.width,self.height+object2.height+self.zeight+object2.zeight )
def __gt__(self,other):
return self.areaa() > other.areaa()
w1 = int(input())
h1 = int(input())
w2 = int(input())
h2 = int(input())
z1=int(input())
z2=int(input())
s1 = Shape(w1, h1,z1)
s2 = Shape(w2, h2,z2)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run