0
import numpy as np
matriz = []
medias = []
alunos=1
while True:
print("Informe o número do aluno ou um valor negativo para terminar:")
valor=int(input('Digite o número do aluno: '))
if valor<0:
break
else:
alunos=1
linha=[valor]
media1=[]
media2=[]
media3=[]
media4=[]
media5=[]
media6=[]
for i in range(0,3,1): #Notas disciplina 1
n1=float(input("Informe as notas da disciplina 1: "))
linha.append(n1)
media1.append(n1)
media1.mean()
print(media1)
Its object
media1
is a Python list, which does not have a method calledmean
. What you need is notmedia = np.mean(media1)
?– Woss
Exactly! Thank you very much!
– Guilherme