When I click the button of cancel,
I got the follwoing message. I want to see "Goodbye" on the console screen.
What to do?
 
Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\py\use\whileprint.py", line 8, in ?
    num = input( "Be sure to enter a value between 1 and 100: " )
  File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\app.py", line 368, in Win32Input
    return eval(raw_input(prompt))
  File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\app.py", line 363, in Win32RawInput
    raise KeyboardInterrupt, "operation cancelled"
KeyboardInterrupt: operation cancelled
 
num = input( "Enter a number between 1 and 100: " )
while num < 1 or num > 100:
    print "Oops, your input value (", num, ") is out of range."
    num = input( "Be sure to enter a value between 1 and 100: " )
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to