#Pythagoras theorem
# a*a + b*b = c*c
#Show input are pythgorean triple or not
-def PythaGorean(a,b,c):
x=a*a+b*b
y=c*c
if (x==y) :
print 'It is a right angle traingle or Pythagorean triple'
else:
print 'It is not a right angle traingle'
-def ReadValues():
per=input("Enter the value of perpendicular:-")
base=input("Enter the value of base:-")
hypo=input("Enter the value of Hypotenuse:-")
PythaGorean(per,base,hypo)
-def main():
ReadValues()
main()
No comments:
Post a Comment