Skip to content

Instantly share code, notes, and snippets.

@carwin-datarock
Created July 16, 2025 23:30
Show Gist options
  • Select an option

  • Save carwin-datarock/bb52595640f54d931481b8b720fef8bf to your computer and use it in GitHub Desktop.

Select an option

Save carwin-datarock/bb52595640f54d931481b8b720fef8bf to your computer and use it in GitHub Desktop.
WORD_LIST = ["PLATE", "LEAST", "SLATE", "RAISE", "CODER", "SCALE", "STARE", "SASSY"]

We'd like you to implement the game of Wordle.

When a game of Wordle begins, a 5-letter word is chosen at random from a list of words.

The player must try to guess the word by entering a five-letter word.

After each guess, letters are marked as follows:

  • 🟩 = correct letter, correct position
  • 🟨 = correct letter, wrong position
  • ⬜ = letter not in word

Example:

  • Word: CODER
  • Guess: ULCER
  • Result: ⬜⬜🟨🟩🟩

Example:

  • Word: CODER
  • Guess: CODER
  • Result: 🟩🟩🟩🟩🟩 (game won)

A player wins the game if they correctly guess the word within six attempts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment