Q:

Write a program to find sum of two numbers using functions and calculate their average?

I understand the questions but the thing that im not sure about is the part it says "using functions". 
here is my code and wonder if its acceptable;
x= int(input("Enter first number:"))
y= int(input("Enter second number:"))
sum=x+y
average=sum/2
print("Sum of the given two numbers is:", sum)
print("Average of the given numbers is:", average)

A:

Functions are reusable piece of programs. So, you should write functions such that they can be used anywhere later. Suppose you need to calculate an average rate for something, then you'll need avg function to just get the value of average (without printing it) and then divide it by time to get the rate. But your code will print the sum and average values unnecessarily. So, good practice is to compute the values in the function and return them instead of printing them there.
Another point, you are using variables num1 and a interchangeably. There is no need to use both of them. You can directly use a in the input statement. Similarly, for num2 and b, use b directly.
And, if you are using python 3.x, you can use // operator to get the division result as an integer (rounded down to nearest whole number).
So, the code can be modified as:
def sum(x,y):
    return x+y

def avg(x,y):
    return sum(x,y)//2

a= int(input("Enter first number:"))
b= int(input("Enter second number:"))

print("Sum of the given two numbers is: ", sum(a,b))
print("Average of the given numbers is: ", avg(a,b))

