Answer:
Following are the code to this question:
def get_user_num():#defining a method
return -1#return value -1
def compute_avg(n1, n2):#defining method compute_avg that accepts two parameters
return -1#return value -1
user_num1 = user_num2= get_user_num()#defining user_num1 and user_num2 variable that calls method get_user_num
avg_result = compute_avg(user_num1, user_num2)#defining avg_result that calls compute_avg method and store its value
print('The average value is:', avg_result)#use print method to call avg_result
Output:
The average value is: -1
Explanation:
In the given python code, two methods "get_user_num and compute_avg" is defined, in which the second method "compute_avg" accepts two parameters that are "n1 and n2", and both methods will return its value, that is "-1".
In the next step, "user_num1 and user_num2" is defined, that calls method "get_user_num" and stores its value, and the variable avg_result is defined, which calls the "compute_avg" method and stores its value and use the print method is defined, that calls its value.