school.py update

This commit is contained in:
TiagoRG 2022-11-16 15:08:11 +00:00
parent 331f62f9bd
commit de722603fb
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
3 changed files with 25 additions and 25 deletions

View File

@ -1,4 +1,5 @@
Numero Nome Curso Regime DataInscricao nota1 nota2 nota3
40000 TIAGO ROCHA GARCIA 8000 O 2022-09-19 20 20 20
42003 LUIS CARLOS FIGUEIREDO PAULO 8240 O 2006-10-03 16.6 16.5 16.8
39652 FABIO ANDRE SABINO REAL 8040 O 2006-09-06 17.4 13.4 3.4
34801 ABEL LUIS DIAS CARAPICHOSO 8220 O 2006-09-06 17.4 18.9 10.8

1 Numero Nome Curso Regime DataInscricao nota1 nota2 nota3
2 40000 TIAGO ROCHA GARCIA 8000 O 2022-09-19 20 20 20
3 42003 LUIS CARLOS FIGUEIREDO PAULO 8240 O 2006-10-03 16.6 16.5 16.8
4 39652 FABIO ANDRE SABINO REAL 8040 O 2006-09-06 17.4 13.4 3.4
5 34801 ABEL LUIS DIAS CARAPICHOSO 8220 O 2006-09-06 17.4 18.9 10.8

View File

@ -36,6 +36,7 @@ Numero Nome Nota
39450 RUI BARBOSA SOARES FIGUEIREDO 12.9
39652 FABIO ANDRE SABINO REAL 11.4
39840 JOAO FILIPE MAGALHAES CARVALHO PINTO 17.7
40000 TIAGO GARCIA 20.0
40301 FILIPE MIGUEL FIGUEIREDO DA SILVA 9.5
40747 JOEL DOS SANTOS MIRANDA 17.0
41084 RICARDO JORGE MOREIRA SILVA MACHADO 11.4
@ -57,4 +58,3 @@ Numero Nome Nota
43021 NUNO MIGUEL MOGAS DA SILVA 14.9
43222 MARCO RODRIGUES 10.3
43267 ELTON MONTEIRO GOMES 12.0

View File

@ -23,10 +23,9 @@ def printPauta(lst, filename=""):
text = f'{"Numero":>6} {"Nome":^50} {"Nota":>4}\n'
for aluno in lst:
text += f'{aluno[0]:>6} {aluno[1]:^50} {notaFinal(aluno):>4.1f}\n'
if filename == "":
print(text)
else:
print(text, file=open(filename, 'w'))
with open(filename, 'w') as f:
f.write(text)
# d)