0

The error in the picture is highlighted in red.

So, I have used this code on another computer and it worked, why wont it work now? I may have made a really small and stupid error and if I have I'm sorry for wasting your time but, it should work. By the way, this is only made to run in the python shell and it is not supposed to have an graphics except for the text.

For a bit of context, this is being used at the beginning of a game I am creating and it is used to determine the difficulty level.

If this isn't supposed to work at all but there is an alternative, I would appreciate the help.

enter image description here

All help, comments and answers are appreciated.

1 Answers1

1

You need to write while difficulty < 1 and difficulty > 3. A comparision needs two elements, and the second statement is currently missing the left hand side operand. Note that the statement does not ever evaluate to true, since an integer cannot be smaller than one and larger than three at the same time. You probably meant to use or here.