English

State whether the following is function overloading or not. Explain why or why not. def(x,y,z) def(e,f)

Advertisements
Advertisements

Question

State whether the following is function overloading or not. Explain why or why not.

def(x,y,z)
def(e,f)

Explain
Advertisements

Solution

Function overloading (in languages that support it).

The two functions have different signatures because one has three parameters and the other has two parameters. However, in Python, the later definition will overwrite the earlier one.

shaalaa.com
  Is there an error in this question or solution?
Chapter 2: Concept of Object Oriented Programming - EXCERCISE [Page 38]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 2 Concept of Object Oriented Programming
EXCERCISE | Q 14. b. | Page 38
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×