Discussion about this post

User's avatar
Orith Loeb's avatar

Hi, please find below:

# DDC-8: Test for Pythagorean triplets

a,b,c = map (int, input ("Please enter the three numbers separated by a space: ").split())

def IsPythagorianTriplet (a,b,c):

if (a**2+b**2 == c**2 ):

return print ("This is a pythagorean triplet")

else:

return print ("The three numbers are not a pythogarean triplet")

IsPythagorianTriplet (a,b,c)

Expand full comment
5 more comments...

No posts