B02E – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-CBSE12D-2017-B02E #PYTHON#6414    siteicon   siteicon  

Problem Statement - B02E

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.

Solution

TC++ #6414

def Area(side):
    print side*side
def Area(length,breadth):
    print length*breadth


Share

CSKC| Created: 12-Jan-2019 | Updated: 12-Jan-2019|CBSE12D-2017









Back