Last active
July 7, 2021 17:43
-
-
Save daduam/8f730996a0f54e1af6153b8a88f8c627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
correct = list(input().split()) | |
grades = dict() | |
while True: | |
temp = list(input().split()) | |
id = temp[0] | |
if id == "999": | |
break | |
answer = temp[1:] | |
grade = 0 | |
for i in range(len(correct)): | |
if answer[i] == "x": | |
continue | |
grade += 1 if answer[i] == correct[i] else -1 | |
grades[id] = grade | |
for key, value in grades.items(): | |
print("{} {} marks".format(key, value)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment