I'm Writing a code, where the user can input one option out of a multiple choice selection. Whatever answer they give, such as "a" or "b", gets written as either "Correct" or "Not Correct" into a separate text file, (StudentAnswers.txt). Obviously, the new text file will be filled with multiple lines of "Correct", and "Incorrect"
This part has already been achieved, but can someone please show me how to create a code which reads the text file "StudentAnswers", and if the total number of recurring "Correct" values is greater or equal to half, print "Passed", or if not print "Fail"
Hope you guys Understand. Thanks.