Created
October 10, 2021 00:10
-
-
Save Aadrian0/bf3723da51b4ad1febdc00ec2642d20d to your computer and use it in GitHub Desktop.
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
velho = 0 | |
nomeclatura = '' | |
nova = 0 | |
media1 = 0 | |
for info in range(1, 5): | |
nome = str(input(f'Nome da {info}a pessoa: ')) | |
idade = int(input(f'Idade da {info}a pessoa: ')) | |
sexo = str(input(f'Sexo da {info}a pessoa (m) (f): ')) | |
if sexo.lower() == 'm' and idade > velho: | |
velho = idade | |
nomeclatura = nome | |
else: | |
if idade > velho: | |
velho = idade | |
nomeclatura = nome | |
media1 = media1 + idade | |
if sexo.lower() == 'f': | |
if idade < 20: | |
nova += 1 | |
media = media1 / 4 | |
print(f'O homem mais velho tem {velho} anos e o nome dele é {nomeclatura}') | |
print(f'a media das idades é {media} anos.') | |
print(f'Existem {nova} mulheres abaixo de 20 anos.') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment