52 Program for function to add 2 numbers in Python Atharva Satyendra Agrawal March 27, 2020 Atharva Satyendra Agrawal Program 1: # function to add 2 nos x=int(input("enter value of x: ")) #global variable y=int(input("enter value of y: ")) def add(): z=x+y #local variable print("sum of",x,"and",y,"is",z) add()#function call Output: Tweet Share Share Share Related Post