Skip to content

Commit f7329a0

Browse files
committed
doc: add comments
Conditional exercises (if, elif, else). Analyzing triangle V1.0
1 parent 5d5ef72 commit f7329a0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ex035.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#35- Develop a program that reads the length of three straight lines and tells the user whether or not they can form a
1+
#Analyzing Triangle v1.0
2+
#35-Develop a program that reads the length of three straight lines and tells the user whether or not they can form a
23
# triangle.
34
print('-=-' * 20)
45
print(' Triangle analyzer...')
@@ -10,3 +11,18 @@
1011
print('The segments above CAN form a triangle.')
1112
else:
1213
print('The segments above CANNOT form a triangle.')
14+
15+
16+
#Analisando Triângulo v1.0
17+
#035: Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas podem ou não formar um triângulo.
18+
primeiro = float(input('Digite o valor da primeira reta:'))
19+
segundo = float(input('Digite o valor da segunda reta:'))
20+
terceiro = float(input('Digite o valor da terceira reta:'))
21+
if primeiro < segundo + terceiro and segundo < primeiro + terceiro and terceiro < segundo + primeiro:
22+
print('Você terá um triângulo.')
23+
else:
24+
print('Você não terá um triângulo.')
25+
26+
27+
#PT- Exercícios com uso de condicional.
28+
#EN- Exercises using conditional.

0 commit comments

Comments
 (0)