
Untitled
By: a guest on
Apr 12th, 2011 | syntax:
None | size: 0.83 KB | hits: 82 | expires: Never
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()