Skip to content

Commit 5a5314b

Browse files
authored
Create addition using function
1 parent f581e7e commit 5a5314b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

addition using function

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#Python program to add two numbers using function
2+
3+
def add_num(a,b):#function for addition
4+
sum=a+b;
5+
return sum; #return value
6+
7+
num1=25 #variable declaration
8+
num2=55
9+
print("The sum is",add_num(num1,num2))#call the function

0 commit comments

Comments
 (0)