[Tutor] Stephen Mik-Almost Brand New to Python 3.4.0-"Guess My Number" program is syntactically correct but will not run as expected

Steven D'Aprano steve at pearwood.info
Mon Apr 28 20:29:38 CEST 2014

On Mon, Apr 28, 2014 at 01:49:31PM -0400, C Smith wrote:
> That is definitely more useful information in answering your questions.
> Whenever you see the error you are getting:
> NameError: name 'smv_guessNumber' is not defined
> That means you are using a variable, in this case 'smv_guessNumber', that
> has not been created yet.

So far so good. But your next comment:

> The reason this is happening here is you need to import sys.

Not so much. This has nothing to do with importing sys. If it were, the 
error would likely have been:

NameError: name 'sys' is not defined


More information about the Tutor mailing list