i have a problem with the following
(some vaiation of a word quiz game)
(ignore first group of hashs)
I am having a problem with this line -'if int(WordTank.co unt(i))< int(GuessWord.c ount(i)):'- i tried few variations, but non-of-them seems to work (
any suggestions?
Thank you in advance,
Netwatcher
(some vaiation of a word quiz game)
(ignore first group of hashs)
Code:
import random
WordTank=''
GuessTank=''
GuessList=12
GuessWords=['tank','poop','poopster']
GuessWord=random.choice(GuessWords)
def MajorInputPlace(GuessList,GuessTank,WordTank):
while 1:
print 'Please insert your guess below'
MainInput=raw_input('')
###If letters in GuessWord are in WordTank:
####print 'you won','The word was',GuessWord
####raise SystemExit
if MainInput!='':
GuessList=int(GuessList)-int(1)
for word in MainInput:
for i in word:
if i in WordTank:
if int(WordTank.count(i))< int(GuessWord.count(i)):
WordTank+=i+','
else:
pass
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=='':
print WordTank
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 'You have '+str(GuessList)+' Guesses left!'
print 'You have '+str(GuessList)+' Guesses left!'
MajorInputPlace(GuessList,GuessTank,WordTank)
def Win():
print 'Congratulations, You have won the game, yeepy :D'
any suggestions?
Thank you in advance,
Netwatcher
Comment