Dec-22-2019, 06:46 PM
It's really hard to tell from that code. Please checkout these instructions for using BBCode to post code. Also, please don't use ; to put multiple commands on one line. It makes it much harder to follow your code.
It's not clear to me exactly what the problem is, given how the code was posted. I would note that attempts is an integer, so you don't need to keep using int(attempts) when checking it. On the other hand, guess is a string, so you may want to use int(guess) in the while condition. Generally, I would just convert it once, either by putting int() around the input statement, or with something like
It's not clear to me exactly what the problem is, given how the code was posted. I would note that attempts is an integer, so you don't need to keep using int(attempts) when checking it. On the other hand, guess is a string, so you may want to use int(guess) in the while condition. Generally, I would just convert it once, either by putting int() around the input statement, or with something like
guess = int(guess)
.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures