Program:
class rect():def __init__(self,breadth,length):
self.breadth=breadth
self.length=length
def area(self):
return self.breadth*self.length
a=int(input("Enter length of rectangle: "))
b=int(input("Enter breadth of rectangle: "))
object1=rect(a,b)
print(f"\t-->Area of rectangle: {object1.area()} Squr. unit")
Expected O/P:
Enter length of rectangle: 10
Enter breadth of rectangle: 11-->Area of rectangle: 110 Squr. unit
1 Comments
It's a nice article, Which you have shared here about the . Your article is very informative and I really liked the way you expressed your views in this post. Thank you.Square Rectangle Serving Board online for sale
ReplyDeletePost a Comment