-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday2.py
32 lines (29 loc) · 987 Bytes
/
day2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
def Rock_Paper_Scissors():
total_score = 0
with open('day2_input.txt') as input:
for item in input:
play = item.split()
print(play)
if play[0] == "A":
if play[1] == "X":
total_score += 3+1
if play[1] == "Y":
total_score += 6+2
if play[1] == "Z":
total_score += 0+3
elif play[0] == "B":
if play[1] == "X":
total_score += 0+1
if play[1] == "Y":
total_score += 3+2
if play[1] == "Z":
total_score += 6+3
elif play[0] == "C":
if play[1] == "X":
total_score += 6+1
if play[1] == "Y":
total_score += 0+2
if play[1] == "Z":
total_score += 3+3
print(total_score)
Rock_Paper_Scissors()