Skip to content

Commit 5641540

Browse files
authored
Update AnaliseTriangulo.py
1 parent 8202863 commit 5641540

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

AnaliseTriangulo.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@
2121
print("O triangulo é escaleno")
2222

2323
#Retangulo
24-
r = input("O triangulo possui um angulo de 90°? ").strip().upper()[0]
25-
if r == 'S' :
26-
print("Retangulo = True")
27-
else:
28-
print("Retangulo = False")
24+
while True:
25+
r = str(input("O triangulo possui um angulo de 90°? [S/N]")).strip().upper()[0]
26+
if r in 'SN':
27+
if r == 'S':
28+
print("Retangulo = True")
29+
else:
30+
print("Retangulo = False")
31+
break
32+
print("Escolha uma opcao valida!")
2933

0 commit comments

Comments
 (0)