By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Revision Quiz Score System Advice Needed

P: 2
Hi I have developed a few simple quizzes to test students on the keywords for different topics I teach. I would now like to be able to store each students last 5 scores in the quiz to show progress. I teach 4 different classes and would like to keep each classes scores separate if possible. I am fairly new to Python and don't necessarily want the code to do this, just some possible ideas to get me on the right track. The simpler the better.
Feb 7 '15 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 614
A simple text file will work just fine with one line per student per grade. Use a comma or some sequence to separate the fields. Each record would contain class, date, student ID or name, and the score. If you only want 5 scores, then you would also run the file through a filter that would only keep the latest 5 class, date, student ID records. You can store all of the classes in one file or output a separate file for each class, which would be faster if the files are huge but if you are expecting a thousand or so records it doesn't make much difference. Reading and writing file tutorial http://www.freenetpages.co.uk/hp/ala...d/tutfiles.htm
Feb 7 '15 #2

P: 2
@dwblas
Thanks for the advice and link!
Feb 8 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.