Created
November 30, 2019 11:14
-
-
Save MM-coder/bbfa595e4d006df1f53835e9bff12598 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import statistics | |
notas = {} | |
lines = open("notas.txt", encoding = 'utf-8').readlines() | |
for line in lines: | |
proc = line.split() | |
notas[proc[0]] = statistics.mean([int(proc[1]), int(proc[2]), int(proc[3]), int(proc[4])]) | |
with open('resultados.txt', 'w+', encoding = 'utf-8') as file: | |
for x in notas: | |
if notas[x] >= 50 and notas[x] < 70: | |
nota = "Satisfaz" | |
if notas [x] >= 70 and notas[x] < 90: | |
nota = "Satisfaz Bem" | |
if notas [x] >= 90: | |
nota = "Satisfaz Muito Bem" | |
else: | |
nota = "Não Satifaz" | |
file.write(x + ' - ' + nota + '\n') | |
This file contains hidden or 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
Abelardo 87 23 54 45 | |
Betina 89 89 72 91 | |
Cinderela 84 75 83 34 | |
Dorinda 89 99 96 84 | |
Eduíno 99 97 95 93 | |
Feliciano 84 85 85 85 | |
Georgete 81 74 70 98 | |
Hersília 45 45 68 49 | |
Ireneia 29 35 67 56 | |
Jovelino 89 89 90 85 | |
Lubélia 100 89 96 99 | |
Melinda 67 78 50 67 | |
Nivaldo 34 38 46 56 | |
Ordonho 75 73 72 79 | |
Plínio 90 82 72 94 | |
Quirilo 56 67 73 71 | |
Ronaldo 77 70 77 70 | |
Segismundo 98 98 95 99 | |
Taciana 100 99 99 100 | |
Ursício 54 57 60 67 | |
Vitaliano 72 79 85 75 | |
Xénio 44 52 48 66 | |
Zebedeu 66 76 66 67 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment