Created
June 5, 2017 17:41
-
-
Save fernandosavio/e8247852fd7a2ecde1c9d29e997e13cd 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
notas = [] | |
# registra todas as 10 notas | |
for i in range(1, 11): | |
nota = float(input("Insira a nota do {}º aluno: ".format(i))) | |
notas.append(nota) | |
# calcula a média | |
media = sum(notas)/len(notas) | |
print('Média:', media) | |
# https://docs.python.org/3.6/library/functions.html#zip | |
for aluno, nota in zip(range(1, 11), notas): | |
if nota > media: | |
print("O aluno {} com a nota {} está acima da média.".format(aluno, nota)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment