Answers for "pythagoras theorem in c++"

20

pythagorean theorem python

distance = math.sqrt((abs(distancex) ** 2) + (abs(distancey) ** 2))
Posted by: Guest on September-10-2020
0

pythagoras theorem in python

def pythagoras(a,b,c):
    
    if a**2 == b**2 + c**2 or b**2 == a**2 + c**2 or c**2 == a**2 + b**2:
        print("YES")
        
    elif b**2 == abs(a**2 - c**2) or a**2 == abs(b**2 - c**2) or c**2 == abs(a**2 - b**2):
        print("YES")
        
    else:
        print("NO")
        
a = int(input())
b = int(input())
c = int(input())
pythagoras(a,b,c)
Posted by: Guest on November-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language