Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- """Stored List"""
- correctAnswers = ['B','D','A','A','C','A','B','A','C','D','B','C','D','A','D','C','C','B','D','A']
- """Wrong answers"""
- wrong= []
- """Input file"""
- fileName = input("Enter the test file to grade: ")
- infile = open(fileName, 'r')
- wordlist = list(infile.readline())
- print (wordlist)
- """Comparing List"""
- for x in wordlist:
- if wordlist[x]== correctAnswers[x]:
- numCorrect = 0
- numCorrect +=1
- else:
- numWrong = 0
- numWrong +=1
- list.append[x]
- if correctAnswers >= 15:
- print ("Passed!")
- else:
- print ("Failed!")
- print (correctAnswers)
- print (wrong)
- while x <len(wrong):
- print ("incorrect")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement