Skip to content

Commit b0d7595

Browse files
committed
Updated
1 parent 3a2fa6d commit b0d7595

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

ex033.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Faça um programa que leia três números e mostre qual é o maior e qual é o menor.
2-
a = int(input('Digite o primeiro valor:'))
3-
b = int(input('Digite o segundo valor:'))
4-
c = int(input('Digite o terceiro valor:'))
5-
menor = a
6-
if b < a and b < c:
7-
menor = b
8-
if c < a and c < b:
9-
menor = c
10-
maior = a
11-
if b > a and b > c:
12-
maior = b
13-
if c > a and c > b:
14-
maior = c
15-
print('O menor valor digitado foi {}.'.format(menor))
16-
print('O maior valor digitado foi {}.'.format(maior))
1+
# Write a program that reads three numbers and shows which is the largest and which is the smallest.
2+
first_value = int(input('Enter the first value:'))
3+
second_value = int(input('Enter the second value:'))
4+
third_value = int(input('Enter the tirth value:'))
5+
smallest = first_value
6+
if second_value < first_value and second_value < third_value:
7+
smallest = second_value
8+
if third_value < first_value and third_value < second_value:
9+
smallest = third_value
10+
largest = first_value
11+
if second_value > first_value and second_value > third_value:
12+
largest = second_value
13+
if third_value > first_value and third_value > second_value:
14+
largest = third_value
15+
print(f'The smallest value is {smallest}.')
16+
print(f'The largest value is {largest}.')

ex034.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Escreva um programa que pergunte o salário de um funcionário e calcule o valor do seu aumento. Para salários
2-
# superiores a R$1.250,00 calcule um aumento de 10% para os inferiores ou iguais, o aumento é de 15%.
3-
salario = float(input('Qual é o seu salário em R$?'))
4-
if salario <= 1250:
5-
novo = salario + (salario * 0.15)
1+
# Write a program that asks for an employee's salary and calculates the amount of his raise. For salaries
2+
# above R$1,250.00, calculate an increase of 10% for those below or equal, the increase is 15%
3+
salary = float(input('What is your salary in R$?'))
4+
if salary <= 1250:
5+
new = salary + (salary * 0.15)
66
else:
7-
novo = salario + (salario * 0.10)
8-
print('Quem ganhava R${:.2f} passa a ganhar R${:.2f} agora.'.format(salario, novo))
7+
new = salary + (salary * 0.10)
8+
print(f'Who won R${salary} starts to win R${new} now.')

ex035.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas podem ou não formar um
2-
# triângulo.
1+
# Develop a program that reads the length of three straight lines and tells the user whether or not they can form a
2+
# triangle.
33
print('-=-' * 20)
4-
print('Analisador de triângulos...')
4+
print(' Triangle analyzer...')
55
print('-=-' * 20)
6-
r1 = float(input('Primeiro segmento:'))
7-
r2 = float(input('Segundo seguimento:'))
8-
r3 = float(input('Terceiro segmento:'))
9-
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2:
10-
print('Os segmentos acima PODEM formar um triângulo.')
6+
first_segment = float(input('First segment:'))
7+
second_segment = float(input('Second segment:'))
8+
third_segment = float(input('Third segmant:'))
9+
if first_segment < second_segment + third_segment and second_segment < first_segment + third_segment and third_segment < first_segment + second_segment:
10+
print('The segments above CAN form a triangle.')
1111
else:
12-
print('Os seguimentos acima NÂO PODEM formar triângulo.')
12+
print('The segments above CANNOT form a triangle.')

0 commit comments

Comments
 (0)