Imagine that you're writing a program to play Hangman. The program has thought of a secret word, and the user is trying to guess it. Write a display word
block that takes two inputs, the secret word and a list of the letters guessed by the user so far. It should report the letters of the secret word, spaced out, with underscore characters replacing the letters not yet guessed:
(Use the word → list
block or the split
block on the secret word to get started.)
In your own program, you would likely use this block within a say
block, like this:
Consider why it's best to make the block a reporter, rather than directly say
ing the result.