+ 1
overloading is basically a methodology of something which can work accordingly what we provide to it. def a_power_b(a,b=None): if b==None: return a**0 else: return a**b print(a_power_b(5,6)) >>>15625 print(a_power_b(5)) >>>1 here function a_power_b is taking parameter a and b if we provide only a it will return a to the power zero i.e 1 but if we give two argumnts integer type it will display the b power of a 5**6 = 5*5*5*5*5*5
3rd Sep 2018, 7:38 PM
apurvchaudhary©
apurvchaudhary© - avatar