Last active
March 2, 2018 23:50
-
-
Save nobitagit/be42ab013360e9b10eb91df1eb7c00f5 to your computer and use it in GitHub Desktop.
Revisions
-
nobitagit revised this gist
Mar 2, 2018 . 1 changed file with 0 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +0,0 @@ -
nobitagit revised this gist
Mar 2, 2018 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ def to_score(ch): if ch in scores: if ch.isupper(): return scores[ch] + 2 else: return scores[ch] return maxScore -
nobitagit created this gist
Mar 2, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ scores = { 'q': 5, 'w': 4, 'e': 3, 'r': 2, 't': 3, 'y': 3, 'u': 2, 'i': 3, 'o': 4, 'p': 5, 'a': 4, 's': 3, 'd': 2, 'f': 1, 'g': 2, 'h': 2, 'j': 1, 'k': 2, 'l': 3, ';': 4, 'z': 5, 'x': 4, 'c': 3, 'v': 2, 'b': 3, 'n': 3, 'm': 2, ',': 3, '.': 4, '/': 5, '1': 6, '2': 5, '3': 4, '4': 3, '5': 4, '6': 4, '7': 3, '8': 4, '9': 5, '0': 6, ' ': 1 }