File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 99print (f'Your name in total has { len (name )- name .count (' ' )} letters.' )
1010separate = name .split ()
1111print (f'Your first name is { separate [0 ]} and he has { len (separate [0 ])} letters.' )
12+
13+ # 022: Crie um programa que leia o nome completo de uma pessoa e mostre:
14+ # O nome com todas as letras maiúsculas e minúsculas.
15+ # Quantas letras ao todo (sem considerar espaços).
16+ # Quantas letras tem o primeiro nome.
17+ '''nome = str(input("Qual o seu nome completo?"))
18+ print(f"Seu nome com todas as letras em maiúsculo fica: {nome.upper()}")
19+ print(f"Seu nome em minúsculo fica: {nome.lower()}")
20+ print(f"Seu nome sem espaços tem {len(nome)-nome.count(' ')} letras.")
21+ separado = nome.split()
22+ print(f"Seu primeiro nome {separado[0]} tem {len(separado[0])} letras.")'''
23+
24+
25+ #PT- treinando a manipulação de strings.
26+ #EN- training string manipulation.
Original file line number Diff line number Diff line change 99print (f'Your ten is { ten } .' )
1010print (f'Your hundred is { hundred } .' )
1111print (f'Your thousand is { thousand } .' )
12+
13+
14+ # 023: Faça um programa que leia um número de 0 a 9999 e mostre na tela cada um dos dígitos separados.
15+ '''numero = int(input('Digite um número qualquer:'))
16+ print(f'Analizando o numero {numero}....')
17+ print(f'Sua unidade é {numero // 1 % 10}, '
18+ f'sua dezena é {numero // 10 % 10},'
19+ f'sua centena é {numero // 100 % 10},'
20+ f'e seu milhar é {numero // 1000 % 10}')'''
21+
22+ #PT- treinando a manipulação de strings.
23+ #EN- training string manipulation.
Original file line number Diff line number Diff line change 1- #24- Create a program that reads the name of a city and says whether or not it starts with the name 'Saint'.
1+ #24- Create a program that reads the name of a city and says whether or not it starts with the name 'Saint'.
2+ from time import sleep
23city = str (input ('What city were you born?' )).strip ()
4+ print ('Has a Saint in the name ?)
5+ sleep (1 )
36print (city [:5 ].upper () == 'SAINT' )
7+
8+ #024: Crie um programa que leia o nome de uma cidade diga se ela começa ou não com o nome "SANTO".
9+ '''cidade = str(input('Digite o nome de uma cidade:')).strip()
10+ print('Tem Santo no nome?')
11+ sleep(1)
12+ print(cidade[:5].upper() == 'SANTO')'''
13+
14+
15+ #PT- treinando a manipulação de strings.
16+ #EN- training string manipulation.
You can’t perform that action at this time.
0 commit comments