As I can see your code is not indented properly. You’ve put your return function outside of the condition. The compiler is reading your code before the return, and can’t proceed on and giving you the error message. You always have to the return inside your myfunction.
I am editing your code a little and put the return statement inside your function so that it can run correctly.
# Python 3 Code
def myfunction(a, b):
# Print the value of a+b
add = a + b
# Print values in list
print('Addition: ', myfunction(10, 34));
Now you can see the code indented properly and the return statement is just inside the function. This program will run and print
For further understanding, you may go through the link