Advertisement
Guest User

Untitled

a guest
Apr 12th, 2011
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. def main():
  2. """Stored List"""
  3. correctAnswers = ['B','D','A','A','C','A','B','A','C','D','B','C','D','A','D','C','C','B','D','A']
  4. """Wrong answers"""
  5. wrong= []
  6. """Input file"""
  7. fileName = input("Enter the test file to grade: ")
  8. infile = open(fileName, 'r')
  9. wordlist = list(infile.readline())
  10.  
  11. print (wordlist)
  12.  
  13. """Comparing List"""
  14. for x in wordlist:
  15. if wordlist[x]== correctAnswers[x]:
  16. numCorrect = 0
  17. numCorrect +=1
  18. else:
  19. numWrong = 0
  20. numWrong +=1
  21. list.append[x]
  22.  
  23. if correctAnswers >= 15:
  24. print ("Passed!")
  25. else:
  26. print ("Failed!")
  27.  
  28. print (correctAnswers)
  29. print (wrong)
  30. while x <len(wrong):
  31. print ("incorrect")
  32.  
  33. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement