POLYMORPHISM

Program in python to calculate the area of circle, rectangle and triangle using polymorphism.

Input

* Enter a random number for calculating area of figure.
* Min 1 input and Max 3 inputs can be given.   
* Separate each input parameter with a single space.




Step by Step logic

Press Next to proceed

Output







Attempt Task

  1. For Overloading a method in python requires :





  2. Can we overload a method with same number of arguments in python?



  3. How can we get the area of a square? :





  4. Assume a method getArea() is overloaded, having 0, 1 and 2 parameters respectively. Which of the definition of overloaded method is more likely to be executed if overloaded method is called in such a way : getArea(0) ?






  5. What will happen if signature of called method doesn't match with any overloaded method?