Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arq = open("resultado.csv", "w+")
- i = 0 # Posicao da lista da resposta de cada aluno
- j = 0 # Posicao da lista de resposta do aluno
- while i < len(resposta)-1:
- pontQ, pontM, pontF, pontP = 0, 0, 0, 0
- for lista in resposta[i]:
- if j == 0:
- arq.write(lista[j]+';')
- if j == 1:
- arq.write(lista[j]+';')
- if j in range(2, 10):
- if lista[j] == gabarito[j-2]:
- pontQ += 1
- elif j in range(10, 18):
- if lista[j] == gabarito[j-2]:
- pontM += 1
- elif j in range(18, 26):
- if lista[j] == gabarito[j-2]:
- pontF += 1
- elif j in range(26, 34):
- if lista[j] == gabarito[j-2]:
- pontP += 1
- else:
- break
- j += 1
- i += 1
- pontP *= 1.5
- pontM *= 1.5
- arq.write(str(pontQ)+';')
- arq.write(str(pontM)+';')
- arq.write(str(pontF)+';')
- arq.write(str(pontP)+';')
- arq.write(str(pontQ+pontM+pontF+pontP)+';')
- arq.write("\n")
- arq.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement