this program for pythagorean triplet gives complex numbers for some cases. Can somebody help me with this? : x=int(input("enter side 1")) #inputs sides 1
y=int(input("enter side 2")) #and 2
z=((x**2)+(y**2))**(1/2) #applying pythagoras' theorem[when sides are 4 and 5][1]
if z%1==0:
    print(z,"is the missing side")
elif z%1!=0:
    k=((x**2)-(y**2))
    import math
    math.fabs(k)
    a=k**(1/2)
    print(a,"is the missing side")


  [1]: https://i.stack.imgur.com/wIlwY.jpg