fork download
  1. # Wordle Helper - starter-word scorer and vowel counter
  2. #
  3. # A small helper for Wordle players. It scores opening guesses
  4. # by letter frequency, counts vowels, and checks a guess against
  5. # the pattern of a known answer. Written for today's puzzle,
  6. # #1972 KARAT (Thursday, November 12, 2026), rated Medium.
  7. # The answer is a noun meaning a unit of fineness of gold
  8. # (1/24 part gold in an alloy), pattern KA__T, two vowels.
  9. #
  10. # Full daily hints, solver and difficulty guide:
  11. # https://w...content-available-to-author-only...y.com/
  12. #
  13. # How to use it: run it as-is to see the starter rankings and
  14. # the check for KARAT, or import score_word and count_vowels
  15. # in your own Wordle tools.
  16.  
  17. VOWELS = "AEIOU"
  18.  
  19. # Letter frequencies in common English words, used to score
  20. # an opening guess. E, A, R, I, O, T, N and S carry the most weight.
  21. LETTER_FREQ = {
  22. "E": 12.0, "A": 9.1, "R": 8.0, "I": 7.3, "O": 6.9,
  23. "T": 6.6, "N": 6.5, "S": 6.4, "L": 5.8, "C": 5.2,
  24. "U": 4.5, "D": 4.3, "P": 3.7, "M": 3.4, "H": 3.3,
  25. "G": 2.9, "B": 2.6, "F": 2.3, "Y": 2.2, "W": 2.0,
  26. "K": 1.8, "V": 1.2, "X": 0.4, "Z": 0.3, "J": 0.3, "Q": 0.2,
  27. }
  28.  
  29. STARTERS = ["CRANE", "SLATE", "STARE", "AUDIO", "RAISE"]
  30.  
  31.  
  32. def count_vowels(word):
  33. """Return the number of vowels (A, E, I, O, U) in a word."""
  34. return sum(1 for ch in word.upper() if ch in VOWELS)
  35.  
  36.  
  37. def score_word(word):
  38. """Score a guess: sum of letter frequencies, counting each
  39. distinct letter once so repeated letters do not inflate it."""
  40. return round(sum(LETTER_FREQ.get(ch, 0.0) for ch in set(word.upper())), 1)
  41.  
  42.  
  43. def matches_pattern(word, pattern):
  44. """True if word fits a pattern such as KA__T, where _ is unknown."""
  45. if len(word) != len(pattern):
  46. return False
  47. return all(p == "_" or p == w for p, w in zip(pattern, word.upper()))
  48.  
  49.  
  50. def main():
  51. print("Wordle #1972 - KARAT helper")
  52. print("Answer: KARAT, pattern KA__T, vowels:", count_vowels("KARAT"))
  53. print()
  54. print("Starter-word scores (higher is better):")
  55. for word in sorted(STARTERS, key=score_word, reverse=True):
  56. print(" ", word, "vowels:", count_vowels(word), "score:", score_word(word))
  57. print()
  58. print("Does KARAT match KA__T?", matches_pattern("KARAT", "KA__T"))
  59. print("Does PARTY match KA__T?", matches_pattern("PARTY", "KA__T"))
  60.  
  61.  
  62. if __name__ == "__main__":
  63. main()
  64.  
Success #stdin #stdout 0.09s 7904KB
stdin
Standard input is empty
stdout
Wordle #1972 - KARAT helper
Answer: KARAT, pattern KA__T, vowels: 2

Starter-word scores (higher is better):
  RAISE vowels: 3 score: 42.8
  STARE vowels: 2 score: 42.1
  CRANE vowels: 2 score: 40.8
  SLATE vowels: 2 score: 39.9
  AUDIO vowels: 4 score: 32.1

Does KARAT match KA__T? True
Does PARTY match KA__T? False