Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bestand = open('input.txt', 'r')
- alles = bestand.readlines()
- score = 0
- for x in range(len(alles)):
- if alles[x][2] == 'X':
- score += 1
- if alles[x][0] == 'A':
- score += 3
- if alles[x][0] == 'C':
- score += 6
- elif alles[x][2] == 'Y':
- score += 2
- if alles[x][0] == 'A':
- score += 6
- if alles[x][0] == 'B':
- score += 3
- elif alles[x][2] == 'Z':
- score += 3
- if alles[x][0] == 'B':
- score += 6
- if alles[x][0] == 'C':
- score += 3
- print(score)
- score = 0
- for x in range(len(alles)):
- if alles[x][2] == 'X':
- if alles[x][0] == 'A':
- score += 3
- if alles[x][0] == 'B':
- score += 1
- if alles[x][0] == 'C':
- score += 2
- elif alles[x][2] == 'Y':
- score += 3
- if alles[x][0] == 'A':
- score += 1
- if alles[x][0] == 'B':
- score += 2
- if alles[x][0] == 'C':
- score += 3
- elif alles[x][2] == 'Z':
- score += 6
- if alles[x][0] == 'A':
- score += 2
- if alles[x][0] == 'B':
- score += 3
- if alles[x][0] == 'C':
- score += 1
- print(score)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement