Solution:
As I can see, you have a non-default argument after the default argument inside your function
def pythagorean (a, b=-1, c)
the right way to write the function argument is:
def pythagorean (a, c, b=-1)
Moreover, you were wrong in your code on the line return function line. This is not gonna return anything. To fix the program, set all the arguments to default in your function. Now, the question could be, how do we know which two parameters are passed into the function? To make it sure we may have if-elf statement inside our function and end of the function we’ll get the result.
from math import sqrt
def pythagorean (a = -1, b = -1, c = -1):
if a == -1:
return sqrt(c**2 - b**2)
elif b == -1:
return sqrt(c**2 - a**2)
elif c == -1:
return sqrt(a**2 + b**2)
else:
return 0
pytho = pythagorean(a=3, c=9)
print pytho
This may help you. Good Day!