Skip to content

Commit 75633c1

Browse files
committed
updated
From portuguese to english
1 parent 7566aca commit 75633c1

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

ex025.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#Crie um programa que leia o nome de uma pessoa e diga se ela tem "Silva" no nome
2-
nome = str(input('Qual é o seu nome completo?'))
3-
print('Seu nome tem Silva? {}.'.format('silva' in nome.lower()))
1+
# Create a program that reads a person's name and tells if they have "Silva" in their name
2+
name = str(input('What your full name?'))
3+
print(F'Your name has Silva? {'silva' in name.lower()}.')

ex026.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Faça um programa que leia uma frase pelo teclado e mostre quantas vezes aparece a letra "a", em que posição ela
2-
# aparece a primeira vez e em que posição ela aparece a última vez.
3-
frase = input('Digite uma frase:').upper()
4-
print('A letra A aparece {} vezes na frase.'.format(frase.count('A')))
5-
print('A primeira letra A apareceu na posição {}.'.format(frase.find('A')+1))
6-
print('A última letra A apareceu na posição {}.'.format(frase.rfind('A')+1))
1+
# Write a program that reads a sentence from the keyboard and shows how many times the letter "a" appears and in what position it is
2+
# appears the first time and in what position it appears last time.
3+
sentence = input('Enter a sentence:').upper()
4+
print(f'The letter A shows {sentence.count('A')} times.')
5+
print(f'The first letter A shows in position {sentence.find('A')+1}.')
6+
print(f'The last letter A shows in position {sentence.rfind('A')+1}.')

ex027.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Faça um programa que leia o nome completo de uma pessoa, mostrando em seguida o primeiro e o último nome separadamente.
2-
dado = str(input('Digite seu nome completo:'))
3-
nome = dado.split()
1+
# Write a program that reads a person's full name, then shows the first and last names separately.
2+
name = str(input('Enter your full name:'))
3+
value = name.split()
44
print('Muito prazer em te conhecer!')
5-
print('Seu primeio nome é {}.'.format(nome[0]))
6-
print('Seu último nome é {}.'.format(nome[len(nome)-1]))
5+
print(f'Your first name is {value[0]}.')
6+
print(f'Your last name is {value[len(value)-1]}.')

ex028.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Escreva um programa que faça o computador "pensar" em um número inteiro entre 0 e 5 e peça para o usuário tentar
2-
# descobrir qual foi o número escolhido pelo computador. O programa deverá escrever na tela se o usuário venceu ou
3-
# perdeu.
1+
# Write a program that makes the computer "think" of an integer between 0 and 5 and ask the user to try
2+
# find out which number was chosen by the computer. The program should write on the screen whether the user won or
3+
# it lost.
44
from random import randint
5-
computador = randint(0, 5)
5+
computer = randint(0, 5)
66
print('-=-' * 20)
7-
print('Vou pensar em um número de 0 a 5. Tente adivinhar...')
7+
print('I will think of a number from 0 to 5, try guess...')
88
print('-=-' * 20)
9-
jogador = int(input('Em que número eu pensei?'))
10-
if jogador == computador:
11-
print('PARABÉNS! Você conseguiu me vencer.')
9+
player = int(input('What number did I think of?'))
10+
if player == computer:
11+
print('CONGRATULATIONS! You beat me.')
1212
else:
13-
print('GANHEI! Eu pensei no número {} e não no {}!'.format(computador, jogador))
13+
print(f'I WON!!!!! I thought about the number {computer} and not in {player}!')

0 commit comments

Comments
 (0)