Created
May 22, 2024 02:10
-
-
Save jocile/f5b8048a4714dc67ac50097b16492ab3 to your computer and use it in GitHub Desktop.
Desafio de criar equipes com Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Faça um algoritmo para cadastrar os alunos que estão se canditando para equipes de desenvolvimento | |
''' | |
# Monte 4 equipes de alunos | |
equipe = [[],[],[],[]] | |
# Lista de nomes de alunos | |
nomes = set (['Caio','Davi', 'Edmilson', 'Erick', 'Esmael', 'Alison', 'Expedito', 'Armando', 'Kauã', 'Marcos', 'Graziel', 'Raiane', 'Natanael', 'Gabriel', 'Pedro', 'Silas']) | |
for j in range(4): | |
for i in range(4): | |
equipe[i].append(nomes.pop()) | |
# Mostre os nomes por cada equipe | |
for i in range(4): | |
print(f'Equipe {i + 1}: {equipe[i]}\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment