Im trying to write up a code where two txt files are being compared to each other. One text files has the answer like “TFTTFFT” and the other txt files has the result including id like “1234 TT-FFT” The crazy part is that for each correct answer, the student gets 4 points and for every incorrect answer, the student gets -1 and for every no answer, which in this case is represented by a dash(-), the student gets zero. How do i go about writing up a code for this? ANy help will be very much appreciated. I don’t necessarily need some one to code this for me as i have pretty much done the opening of files and storing them in appropriate variables. Just a feed back on how to go about doing this would be nice. Thank you in advance.
Update :
I have revised the whole code and will put it up for consideration. Thank you Josh and thank you all those who have contributed so far. Please do let me know further what you guys think of the revised coding.
Update : Program not working 🙁
1 Answer