This commit is contained in:
2020-12-06 18:33:56 +01:00
parent 0c0570ebb9
commit 1b218d2c0d
5 changed files with 2268 additions and 0 deletions

32
06/task1.py Normal file
View File

@@ -0,0 +1,32 @@
# python again :^P
import string
groups = []
lines = open("input.txt").read().split("\n")
groupIndex = 0
personIndex = 0
tline = ""
for line in lines:
tline += line
if len(line) == 0:
groups.append(tline)
tline = ""
groups.append(tline)
def scoreGroup(group):
gscore = 0
qs = "abcdefghijklmnopqrstuvwxyz"
for char in qs:
if char in group:
gscore += 1
return gscore
score = 0
for group in groups:
score += scoreGroup(group)
print(score)