- To Create a function to add 2 numbers
User Input: 2,3
Output: 5
def add(n1 ,n2) :
return n1+n2
print("Enter two numbers : ", end="")
n1=int(input())
n2=int(input())
print("Sum : ",add(n1,n2))
Enter two numbers : 7 5 Sum : 12Program
//function to add 2 numbers
def add(n1 ,n2) :
return n1+n2 # use add(+) operator
For devision (/), subtraction (-), multiplication (*), you can use their respective operators
ConceptComing Soon !
QuickPractice isn’t the thing you do once you’re good. It’s the thing you do that makes you good.