KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write a Python program to demonstrate the concept of default arguments in a function.

Python Functions

3 Likes

Answer

def add_numbers(a, b=5):
    print(a + b)

add_numbers(3)
add_numbers(9, 4)

Output

8
13

Answered By

1 Like


Related Questions