Skip to content

Commit 1ee3a83

Browse files
committed
doc: add comments
Exercises manipulating text. First and last name of a person.
1 parent a11f218 commit 1ee3a83

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ex027.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
#First and last name of a person
12
#27- Write a program that reads a person's full name, then shows the first and last names separately.
23
name = str(input('Enter your full name:'))
34
value = name.split()
4-
print('Muito prazer em te conhecer!')
5+
print('Nice meet you!')
56
print(f'Your first name is {value[0]}.')
67
print(f'Your last name is {value[len(value)-1]}.')
8+
9+
# Primeiro e último nome de uma pessoa
10+
#27: Faça um programa que leia o nome completo de uma pessoa, mostrando em seguida o primeiro e o último nome separadamente.
11+
'''nome = str(input('Qual o seu nome completo?'))
12+
valor = nome.slpit()
13+
print('Muito prazer em te conheecer!')
14+
print(f'Seu primeiro nome é {valor[0]}.')
15+
print(f'Seu último nome é {valor[len(valor)-1]}.')'''
16+
17+
#PT- treinando a manipulação de strings.
18+
#EN- training string manipulation.

0 commit comments

Comments
 (0)