"Raj Medhekar" <cosmicsan...@yahoo.com> wrote
#guessing loop
while guess != the_number and tries <5:
Well done you correctly spotted that you could use a boolean expression.
if guess > the_number:
print "Lower..."
else:
print "Higher..."
guess = int(raw_input("Take a guess:"))
tries += 1
if tries > 5:
guess == the_number
But you need to do the same thing here....
print "You're right"
else:
print "You lose"
raw_input("\n\nPress the enter key to exit")
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor