-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEX042.py
More file actions
40 lines (35 loc) · 1.05 KB
/
EX042.py
File metadata and controls
40 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
a = float(input("Digite o valor da primeira reta: "))
b = float(input("Digite o valor da segunda reta: "))
c = float(input("Digite o valor da terceira rera: "))
nt = "Não é possivel formar um triangulo!"
"""
if (b - c) < a < (b + c) and (a - c) < b < (a + c) and (a - b) < c < (a + b):
if a == b == c:
tipo = "Equilatero"
elif a == b or b == c or a == c:
tipo = "Isosceles"
else:
tipo = "Escaleno"
print(f'É possivel formar um triangulo e ele é: {tipo}')
else:
print("Não é possivel formar um triangulo!")
"""
if (b - c) < a < (b + c):
if (a - c) < b < (a + c):
if (a - b) < c < (a + b):
if a == b == c:
tipo = "Equilatero"
elif a == b or b == c or a == c:
tipo = "Isosceles"
else:
tipo = "Escaleno"
print(f'É possivel formar um triangulo e ele é: {tipo}')
else:
print(nt)
else:
print(nt)
else:
print(nt)
#| b - c | < a < b + c
#| a - c | < b < a + c
#| a - b | < c < a + b