Q&A CBSE12D-2017-B02E #6414
Question:
Write two methods in Python using concept of Function Overloading (Polymorphism) to perform the following operations:
(i) A function having one argument as side, to calculate Area of Square as side*side
(ii) A function having two arguments as Length and Breadth, to calculate Area of Rectangle as Length*Breadth.
Answer:
def Area(side):
print side*side
def Area(length,breadth):
print length*breadth
