aericktoes

Multiple Choice

Feb 6th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. n = int(input())
  2.  
  3. correct = []
  4. response = []
  5. correctCount = 0
  6. answerCount = 0
  7. checkCount = 0
  8.  
  9. x = 0
  10.  
  11. while correctCount < n:
  12.     correct.append(str(input()))
  13.     correctCount += 1
  14.  
  15. while answerCount < n:
  16.     response.append(str(input()))
  17.     answerCount += 1
  18.  
  19. while checkCount < n:
  20.     if response[checkCount] == correct[checkCount]:
  21.         x += 1
  22.     checkCount += 1
  23.  
  24. print(x)
Advertisement
Add Comment
Please, Sign In to add comment