+3 votes
in Class 12 by kratos

Predict the output of the following program. Also state which concept of OOP is being implemented?

def sum(x,y,z):

print “sum= ”, x+y+z

def sum(a,b):

print “sum= ”, a+b

sum(10,20)

sum(10,20,30)

1 Answer

+5 votes
by kratos
 
Best answer

Type Error: sum() takes exactly 3 arguments (2 given)

Concept: Polymorphism [Function Overloading]

...