I'm writing a maths quiz and I'm trying to calculate an average of a students last score yet I am getting a syntax error on the last line:
if type_of_sort == 3:
with open (filename,'r') as r:
def score(line):
returnint(line.split(':')[1])
average = (sum(map(line)/len(score))
print(name, average)
Even when I removed the last line it would come up with a syntax error even if it wasn't there.The error looks like this:
Syntax Error: Invalid syntax (<module 1>, line 134)
Aucun commentaire:
Enregistrer un commentaire