Skip to content

Instantly share code, notes, and snippets.

@nneonneo nneonneo/hangman.py Secret
Last active Aug 29, 2015

Embed
What would you like to do?
codegolf:25624:justhalf
import sys
R=raw_input
F=';;onastifeybhmudgkprw;topenayridsubwglfhcmkxjv;elsatrodinphmcukwbfgyvjxzq;eatslroncihudpgmfbywvkqxjz;eastrinclodumphygbfvwkxjqz;etnocsiralupdmgyhfbvwkxqjz;enostciarldpmuygvhfbwxqkjz;eitnoasrclupmdyghfvbwxkjqz;einocstarlpumdygvbhfxwqkj;itacslnorepumdgyvfbhxkqw;intaoslecrupymdgfhvbqxjwz;nitaoerclsmudpygfvhbqxj;itneaorscmpdlfuvybh;ratdgfihosw;;ceimontalu'.split(';')
while 1:
w=R();f=0
if'END'==w:break
for c in F[len(w)]:
print c;sys.stdout.flush();x=R();f+=w==x;w=x
if'_'not in x or f>5:break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.