Skip to content

Commit e37f5f7

Browse files
committed
co4 p3 fix
1 parent 1c3d3d4 commit e37f5f7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

C04/C04_p3.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ class Rectangle:
55
def __init__(self):
66
self.__length=int(input("Enter the length:"))
77
self.__width=int(input(("Enter the width:")))
8-
def __lt__(self,ob2):
8+
def __lt__(self):
99
area1=self.__length*self.__width
10-
area2=ob2.__length*ob2.__width
11-
10+
return(area1)
1211

1312

1413
ob1=Rectangle()
1514
print()
1615
ob2=Rectangle()
1716

18-
if ob1 >ob2:
17+
if ob1.__lt__() > ob2.__lt__():
1918
print("Rectangle 1 Area is greater")
2019
else:
2120
print("Rectangle 2 Area is greater")

0 commit comments

Comments
 (0)