Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def endQuiz(u_name, score, studentDetails):
- """ Exits the quiz and saves the score to student file """
- print ("Saving your score")
- for key, value in studentDetails.items():
- if key == u_name:
- studentDetails.setdefault(u_name, []).append(score)
- # write to file
- sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement