The player of the partially-completed Wordle game wants some Pyret "assistance". Open the Spell Checker Starter File and click "Run".

1 In the Interactions Area, test each of the three lines of code (below).

Pyret Expression Number of suggestions returned

alt-words("games", WORDS-100)

alt-words("games", WORDS-1000)

alt-words("games", WORDS-ALL)

A screenshot of the first three turns of a Wordle game

2 Which line of code would you recommend for the player? Why?

3 The solution to the partially-completed game is in fact "camel". Look back at the suggestions in your Interactions Area. Did any of the lists include it?

4 We used the very same function (alt-words) for each entry. Why didn’t we receive the same results from all 3 expressions?

5 To see the words in the WORDS-100 dictionary, type WORDS-100 into the Interactions Area and then click on tree-set. How many words are in this list?

6 What do you notice about the words in the list?

7 What do you wonder?

8 As you might have guessed, the WORDS-1000 dictionary contains 1000 words and the WORDS-ALL dictionary contains even more (2314). How does that help explain the fact that alt-words("games", WORDS-ALL) returned the most suggestions?

Let’s imagine that

  • W1 and W2 represent two different five-letter words

  • alt-words("W1", WORDS-ALL) produces a list that includes W2

Would you expect alt-words("W2", WORDS-ALL) to produce a list that includes W1? Why or why not?


Can you produce an input that returns more than one word from the WORDS-100 dictionary? If so, what is it?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.