Skip to content
Y
yTube.SITE v8.0.4
media / worlds / tools / internet oddities
YouTube / video information

Code a Word Game That Gets Double Letters Right

Video information, playback and saved actions.

Code a Word Game That Gets Double Letters Right

Description: APPLE has two P’s. Your guess, PUPPY, has three. Which P turns green, which turns amber, and which stays grey?

Build a Wordle-style scoring function in Python that gets repeated letters right. You’ll reserve exact matches first, then use a dictionary to keep track of the letters each guess can still claim. Along the way, you’ll fix a one-line bug that gives out an extra amber tile and discover how a grey tile can tell you exactly how many copies of a letter are in the secret word.

Chapters

00:00 The APPLE and PUPPY puzzle
01:44 Build the Python scorer
03:37 Match tile positions to Python list indices
05:26 Reserve green tiles first
05:57 Use spare letters for amber tiles
06:46 Count repeated letters with a dictionary
11:42 Debug the extra amber tile
17:00 Test three guesses against PEAR
19:21 Check letter positions and counts
20:52 Work out what a grey tile proves Close description
      
Videos related to "Code a Word Game That Gets Double Letters Right"

Related videos are temporarily unavailable.

Try again, or come back later.