Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Day02
- scores_p1 = {"A X":4, "A Y":8, "B X":1, "A Z":3, "C X":7, "B Y":5, "B Z":9, "C Y":2, "C Z":6}
- scores_p2 = {"A Y":4, "A Z":8 ,"B X":1, "A X":3, "C Z":7, "B Y":5, "B Z":9, "C X":2, "C Y":6}
- raw_data = open("Input_Day2.txt").read().split("\n")
- total_score_p1 = 0
- total_score_p2 = 0
- for x in raw_data:
- total_score_p1 += scores_p1[x.strip()]
- total_score_p2 += scores_p2[x.strip()]
- print(f"Part 01: {total_score_p1}")
- print(f"Part 02: {total_score_p2}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement