Skip to content
Extraits de code Groupes Projets
Valider 46c12c1c rédigé par Charles-Henry Bertrand Van Ouytsel's avatar Charles-Henry Bertrand Van Ouytsel
Parcourir les fichiers

New version for list of student

parent c371b843
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -11,24 +11,22 @@ if __name__ == "__main__":
print("You modify wrong number of lines !")
exit(1)
if author not in modifs[0] and (author not in modifs[1]) :
print("You modify the line of another student !\n")
exit(1)
curr_line = modifs[1].split(',')
prev_line = modifs[1].split(',')
if len(curr_line) != 4:
print('You broke file format by suppressing/adding "," !\n')
exit(1)
prev_line = modifs[1].split(',')
modifs[0]= modifs[0][1:]
modifs[1]=modifs[1][1:]
for i in range(len(curr_line)):
if i<3 and prev_line[i] != curr_line[i] :
if author not in curr_line[0] and (author not in prev_line[0]) :
print("You modify the line of another student or use a different email than the one written !\n")
exit(1)
for i in range(0,4):
if prev_line[i] != curr_line[i] :
print('You modify your data !\n')
exit(1)
if(curr_line[3]) !='VU' and (curr_line[3]) !=' VU' and (curr_line[3]) !='VU ':
print('You have to write "VU" in the last column !\n')
answer = curr_line[3].lower()
if answer != 'oui' and answer !=' oui' and answer !='oui ':
print('You have to write "oui" in the last column !\n')
exit(1)
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter