You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a function that will accept three parameters, that will check if given combo of numbers apply the pythagoras theory (3,4,5 applies, because 3 ** 2 + 4 ** 2 = 5 ** 2)
#Print to the user if the given three numbers#Apply the Pythagoras formula# a ** 2 + b ** 2 = c ** 2defis_pyth_triple(a, b, c):
num_ab=a**2+b**2num_c=c**2ifnum_ab==num_c:
print(f"The combination of:{a},{b},{c} supports pyth law!")
else:
print(f"The combination of:{a},{b},{c} does not support pyth law!")
is_pyth_triple(3, 4, 5)
is_pyth_triple(5,6,7)