Answers for "Pythagorean theorem formula"

20

pythagorean theorem python

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

pythagoras theorem formula

import math
class point:
    def __init__(self, x, y, z):
        self.x = x
        self.y = y
        self.z = z

p1 = point(10,14,0)
p2 = point(14,14,0)       

distanceByTwoPoints = math.sqrt((p1.y-p2.y)**2 + (p1.x-p2.x)**2)
Posted by: Guest on September-01-2021
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

Code answers related to "Pythagorean theorem formula"

Python Answers by Framework

Browse Popular Code Answers by Language