[Tutor] I'm puzzled

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Jan 23 00:54:06 CET 2006


> Why will this little program crash when you enter the enter key?

[program cut]

Hi Vincent,

What do you mean by "crash"?  Do you get an error message?  If so, can you
show us?


It will also help to think to try playing the situation out without
preconceptions.  In the beginning of the loop, at:

>     a = raw_input('number? ')

what does 'a' contain when you hit enter?




More information about the Tutor mailing list