[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:59:34 CEST 2014


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

     I don't know why you would think importing sys would fix this.

docs say it accepts from sys.stdin


On Mon, Apr 28, 2014 at 1:55 PM, Philip Dexter <philip.dexter at gmail.com>wrote:

>
>
> On Mon, 28 Apr 2014, C Smith wrote:
>
>  I should probably clarify that this list is mainly for python2.7, correct
>> me if I am wrong.
>>
>
> I don't think that is true.
>
>
>  On Mon, Apr 28, 2014 at 1:49 PM, C Smith <illusiontechniques at gmail.com>
>> wrote:
>>
> <snip>
>
>
>  The reason this is happening here is you need to import sys.
>>
>
> I don't know why you would think importing sys would fix this.
>
>  On Mon, Apr 28, 2014 at 1:32 PM, Stephen Mik <mik.stephen at yahoo.com.dmarc.invalid>
>> wrote:
>>     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
>>
>
> Your first while loop is not running. You convert smv_grandCounter to
> an int but compare it with a string.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140428/b4dc6f0e/attachment-0001.html>


More information about the Tutor mailing list