ebosetalee / 20-days-challenge

#20dayschallenge on python
6 stars 0 forks source link

4b - Hangman-02 #13

Closed yudori closed 4 years ago

yudori commented 4 years ago

In your hangman.py, write a program to accept input from a user. The input should be a single letter. If the letter is in the selected word, print out 'YES' and the index of the letter in the word. If the letter is not in the word or if more than one letter was entered, print out 'NO'.

for example, using the selected word 'CHICKEN', if 'K' is entered, the output should be 'YES 4' (we are using zero-based index so we count starting from 0, left to right).

Notes: