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

C Smith illusiontechniques at gmail.com
Mon Apr 28 19:49:31 CEST 2014

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.

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

On Mon, Apr 28, 2014 at 1:32 PM, Stephen Mik <
mik.stephen at yahoo.com.dmarc.invalid> wrote:

> Dear Python Tutor:
>     Well,I am Stephen Mik,and I'm a beginning,rookie programmer who is
> just trying to get a class Assignment going. The instructor of my class
> does not accept email and she is not on Campus on Monday. So,my only
> recourse is to turn to Python Tutor for assistance.
>     My program, Assignment4,does run partially. You can see the results of
> the Python Shell attached to this email. I also have included part of my
> code for your perusal.
>     I must be doing something very wrong. The program is supposed to run a
> main loop ,for control of the program. The program DOES print out the
> prompts before the While Loop, but when it comes to a variable
> named"smv_guessNumber" the program DOES NOT prompt for the input for
> "smv_guessNumber" as it should. It is a mystery to me as to why the program
> will not get to the "smv_guessNumber=int(input("Think out a first
> guess:")". I am mystified why it doesn't reach that point in the program!
> Can anyone please help? I have attached the Python Traceback Error
> Output,which shows that at least part of the program IS working. I also
> have attached part of the code for the Assignment 4 which should help in
> the debugging.I need help ASAP,another program is due very soon and I have
> not even worked out the pseudocode for it yet!
> CONCERNED,Stephen W. Mik
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140428/70606e71/attachment.html>

More information about the Tutor mailing list