Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 84718

A common word-guessing game, usually involving a pictorial representation of a stick figure being hanged, progressively rendered for each wrong guess

2 votes

The right way to hang a man: final part

You are right, your gallows list and its management is ugly. What I had in mind when introducing the generator in my previous answer was that it would yield gallows to print when the next mistake occ …
301_Moved_Permanently's user avatar
35 votes
Accepted

The right way to hang a man

Repetitions All your elif share the same structure. You just need to ensure that the inserted pattern is always 3 wide and you can drop your offsets adjustments. The logical next step is to use a dic …
301_Moved_Permanently's user avatar
2 votes
Accepted

Secret hangman homework

You found the secret word:", secret_word) def main(filename="words.txt"): print("\nWelcome to Hangman Game! … You could change your main part to: def main(filename="words.txt", repeat=sys.maxsize): print("\nWelcome to Hangman Game! …
301_Moved_Permanently's user avatar