Respuesta :

Answer & Explanation #1

To answer your first query. You can write a function that takes two arguments and returns their sum like this:

#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=25  #variable declaration

num2=55

print("The sum is",add_num(num1,num2)) #call the function

Answer & Explanation #2

As for your error, I believe it is an indent error in your first return statement. All you must do is indent the return statement.