Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4dd5a01db9
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (37 sloc) 0.501 kB
f = open('names.txt')
ns = f.read().replace('\"', '')
f.close()
names = ns.split(',')
names = sorted(names)
v = {
'A': 1,
'B': 2,
'C': 3,
'D': 4,
'E': 5,
'F': 6,
'G': 7,
'H': 8,
'I': 9,
'J': 10,
'K': 11,
'L': 12,
'M': 13,
'N': 14,
'O': 15,
'P': 16,
'Q': 17,
'R': 18,
'S': 19,
'T': 20,
'U': 21,
'V': 22,
'W': 23,
'X': 24,
'Y': 25,
'Z': 26,
}
totalnamescores = 0
for name in names:
totalnamescores += sum([v[c]for c in name])*(names.index(name)+1)
print(totalnamescores)
Jump to Line
Something went wrong with that request. Please try again.