Your code performs a summation, but it never returns the value (i.e. it never gives back a value to the caller) - it's stored in the
sum
variable, but nothing else happens with it.
You need this instead:
def ask(num1, num2):
return num1 + num2
print(ask(4, 5))