Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- secret_word = "book"
- guess = ""
- number_of_gueses = 0
- gues_limit = 3
- out_of_guese = False
- guess = input("guess a word : ")
- number_of_gueses += 1
- while guess != secret_word and not out_of_guese:
- if number_of_gueses<gues_limit:
- guess=input("wrong guess try again : ")
- number_of_gueses += 1
- else:
- out_of_guese=True
- if out_of_guese:
- print("you lose!")
- else:
- print("You Win!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement