Vanguard interview question

How would you code a program to answer a hangman game?