I am having problems with this code and im nooby what im trying to do
Create a game where the computer picks a random word and the player has to guess that word. The computer tells the player how many letters are in the word. Then the player gets five chances to ask if a letter is in the word. The computer can only respond with "yes" or "no". Then, the player must guess the word. im trying to learn python from a text book the michael dawson one
i think i didnt do a good job putting it together every letter i guess it just keeps telling me to guess
import random
print "Hello President Bush, I will give you 5 chances to guess letters of one of my secret words.\n On the final chance, you must guess the word"
WORDS = ("bush", "usa", "war", "oil", "iraq", "osama", "alla")
word = random.choice(WORDS)
print "The password is", len(word), "letters long."
guesscount = 0
done = 0
while done <=1:
guess = raw_input("guess a letter: ")
if guess in word:
guesscount += 1
print "yes"
elif guess not in word:
guesscount +=1
print "no"
elif guess == " ":
print "no"
guesscount += 1
elif guesscount == 4:
print "You have to guess the presidents passcode"
guess_word = raw_input("Input code: ")
guess_word = guess_word.lower()
if guess_word == word:
print "The CIA is are already at your house!\n President never gets it on the first try..."
break
elif guess_word != word:
print "President Bush did you forget your password again..."
break