Segue abaixo um exemplo de código em Python que resolve o problema proposto: ``` a = float(input("DIGITE O VALOR DO LADO A: ")) b = float(input("DIGITE O VALOR DO LADO B: ")) c = float(input("DIGITE O VALOR DO LADO C: ")) if a < b + c and b < a + c and c < a + b: print("O TRIÂNGULO EXISTE") if a**2 == b**2 + c**2 or b**2 == a**2 + c**2 or c**2 == a**2 + b**2: print("É UM TRIÂNGULO RETÂNGULO") if a**2 == b**2 + c**2: print("VALOR DOS ÂNGULOS (GRAUS): 90,", round(math.degrees(math.atan(b/c))), ",", round(math.degrees(math.atan(a/b)))) elif b**2 == a**2 + c**2: print("VALOR DOS ÂNGULOS (GRAUS):", round(math.degrees(math.atan(a/c))), ", 90,", round(math.degrees(math.atan(b/a)))) else: print("VALOR DOS ÂNGULOS (GRAUS):", round(math.degrees(math.atan(a/b))), ",", round(math.degrees(math.atan(c/a))), ", 90") else: print("NÃO É UM TRIÂNGULO RETÂNGULO") else: print("TRIÂNGULO INEXISTENTE !") ``` Lembrando que este é apenas um exemplo de código e existem diversas outras formas de resolver este problema.
Para escrever sua resposta aqui, entre ou crie uma conta
Compartilhar