Note:
I've been doing this only for practice and NOT for practical reasons, as you can see the output isn't realy HangMan-like and any combination of the right letters will be accepted so please do NOT comment about the funcunallity of the code!
if it DOESseem nice to you then i thank you very much :D
My problem is in the following-
import random
WordTank=''
GuessTank=''
GuessList=12
GuessWords=['aristocrat','householdl','butcher','imagination','convoluted','great','think','house','animal']
GuessWord=random.choice(GuessWords)
def Win(GuessList,GuessWord):
print 'The word was-','"',GuessWord,'"'
GuessList+=int(GuessList)*2
print 'You Won',GuessList,'Points'
raise SystemExit
def MajorInputPlace(GuessList,GuessTank,WordTank):
while 1:
print 'Please insert your guess below'
MainInput=raw_input('')
p=''
#Problem Starts HERE#
gp=list(GuessWord)
if GuessWord in WordTank:
print 'victory'
Win(GuessList,GuessWord)
else:
pass
#Problem Ends HERE#
if len(MainInput)>6:
print 'You can Guess no more then 6 Characters in a Guess'
continue
if MainInput!='':
GuessList=int(GuessList)-int(1)
q=list(MainInput)
for i in q:
if i in GuessWord:
if WordTank.count(i)<GuessWord.count(i):
WordTank+=i+','
else:
pass
for word in MainInput:
if word not in GuessWord:
if word in GuessTank:
pass
else:
GuessTank+=word+','
if GuessTank=='':
pass
else:
print 'The letters',GuessTank,'Are not in the word'
if WordTank=='':
pass
else:
print 'The letters',WordTank, 'Are in the word'
while GuessList>0:
break
while GuessList==0:
print 'You Failed!'
continue
else:
print 'NO INPUT'
print '\nYou have '+str(GuessList)+' Guesses left!\n'
'\nYou have '+str(GuessList)+' Guesses left!'
MajorInputPlace(GuessList,GuessTank,WordTank)#values change after rounds!#
Literally, what i want is >"if the all the letters in the Word match the letters in the successful letters do whatever"<
any suggestions?
Thank you very much for reading this ;)