From 5ddee82d6cfffae958eda0559140c43cbc3c36ba Mon Sep 17 00:00:00 2001 From: Saxi Patel <80097826+SaxiP@users.noreply.github.com> Date: Thu, 17 Mar 2022 12:55:52 +0300 Subject: [PATCH] Add files via upload --- activity1.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 activity1.py diff --git a/activity1.py b/activity1.py new file mode 100644 index 0000000..1b55984 --- /dev/null +++ b/activity1.py @@ -0,0 +1,10 @@ +#python program to add two numbers using a function + +def add_num(a,b):#function for addition + sum=a+b; + return sum; #return value +num1=int(input("Enter the first value: "))#input from user for num1 +num2=int(input("Enter the second value: "))#input from user for num2 + +print("The sum is",add_num(num1,num2))#call the function +