## HANGMAN - THE GAME # - Two players # - Input a string # - Count the string # - Display the alphabet # - Allow single char entries as guesses # - Draw hangman for all incorrect guesses # print ("Welcome to the Wonderful World of Execution by Noose!") print ("It's a great day for it, eh?") n = 1 while n != 2: startGame = raw_input("Care to try to save a man's life? (Y/N)") if startGame == str("y" or "Y"): print ("Great. Let's get to it!") n = 2 elif startGame == str("n" or "N"): print ("I guess maybe next time.") n = 2 else: print ("Incorrect input, try again: ") n != 2
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question