Skip to content

Instantly share code, notes, and snippets.

@nobitagit
Last active March 2, 2018 23:50
Show Gist options
  • Select an option

  • Save nobitagit/be42ab013360e9b10eb91df1eb7c00f5 to your computer and use it in GitHub Desktop.

Select an option

Save nobitagit/be42ab013360e9b10eb91df1eb7c00f5 to your computer and use it in GitHub Desktop.

Revisions

  1. nobitagit revised this gist Mar 2, 2018. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions to_score.py
    Original file line number Diff line number Diff line change
    @@ -1,7 +0,0 @@
    def to_score(ch):
    if ch in scores:
    if ch.isupper():
    return scores[ch] + 2
    else:
    return scores[ch]
    return maxScore
  2. nobitagit revised this gist Mar 2, 2018. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions to_score.py
    Original 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
  3. nobitagit created this gist Mar 2, 2018.
    43 changes: 43 additions & 0 deletions scores.py
    Original 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
    }