Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Monday, November 23, 2020

Python program to display the concept of user-defined Functions with argument and with return value by G Krishna Chauhan

Source Code

def add(a,b):

    c=a+b

    return c


x=int(input("Enter value of a: "))

y=int(input("Enter value of b: "))

z=add(x,y)

print("The sum is :",z)



OUTPUT


Enter value of a: 4
Enter value of b: 5
The sum is : 9

No comments:

Post a Comment