Created
May 15, 2018 13:47
-
-
Save acwoss/289f4755643eb5d34311d2f1178e45dc to your computer and use it in GitHub Desktop.
LightgraySkeletalChords created by acwoss - https://repl.it/@acwoss/LightgraySkeletalChords
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
from collections import namedtuple | |
Pessoa = namedtuple('Pessoa', ['nome', 'idade']) | |
pessoas = [] | |
for _ in range(3): | |
nome = input('Digite o nome da pessoa: ') | |
idade = int(input('Digite agora a idade da pessoa: ')) | |
pessoas.append(Pessoa(nome, idade)) | |
pessoa = min(pessoas, key=lambda p: p.idade) | |
print(f'{pessoa.nome} é a pessoa mais nova, com {pessoa.idade} anos') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment