diff --git a/day2_rock-paper-scissors/challenge.py b/day2_rock-paper-scissors/challenge.py index 01ababf..9bab448 100644 --- a/day2_rock-paper-scissors/challenge.py +++ b/day2_rock-paper-scissors/challenge.py @@ -39,13 +39,14 @@ def scoreCalculation(self): for line in lines: l = line.split() + #Solve part 1 l[0] = 'R' if l[0]=='A' else 'P' if l[0]=='B' else 'S' l[1] = 'R' if l[1]=='X' else 'P' if l[1]=='Y' else 'S' r = Round(l[0], l[1]) r.scoreCalculation() totalScore1 = totalScore1 + r.score - #Solve parte 2 + #Solve part 2 if l[1] == 'R': #need to lose l[1] = 'P' if l[0]=='S' else 'R' if l[0]=='P' else 'S' diff --git a/day3_Rucksack-Reorganization/challenge.py b/day3_Rucksack-Reorganization/challenge.py index 41f5f50..4e763d9 100644 --- a/day3_Rucksack-Reorganization/challenge.py +++ b/day3_Rucksack-Reorganization/challenge.py @@ -10,6 +10,7 @@ def __init__ (self, items): def findError(self): e = list(set(self.compartments1) & set(self.compartments2)) self.error = e[0] + #calculate the priority if self.error.isupper(): self.priorities = ord(self.error) - 38 else: @@ -35,3 +36,6 @@ def findError(self): +# Elfs are devided into groups of three + +