Alex Pavluck wrote:
> Hello. On page 124 of "Thinking like a Computer Scientist". There is
> an exercise to take the following code and with the use of TRY: /
> EXCEPT: handle the error. Can somone help me out? Here is the code:
>
> def inputNumber(n):
> if n == 17:
> raise 'BadNumb
Alex Pavluck wrote:
> Hello. On page 124 of "Thinking like a Computer Scientist". There is
> an exercise to take the following code and with the use of TRY: /
> EXCEPT: handle the error. Can somone help me out? Here is the code:
>
> def inputNumber(n):
> if n == 17:
> raise 'BadNumb
Alex Pavluck wrote:
> Hello. On page 124 of "Thinking like a Computer Scientist". There is
> an exercise to take the following code and with the use of TRY: /
> EXCEPT: handle the error. Can somone help me out? Here is the code:
> [ ... ]
What error?
Python 2.4.2 (#1, Jan 23 2006, 21:24:54)
[
Hello. On page 124 of "Thinking like a Computer Scientist". There is
an exercise to take the following code and with the use of TRY: /
EXCEPT: handle the error. Can somone help me out? Here is the code:
def inputNumber(n):
if n == 17:
raise 'BadNumberError: ', '17 is off limits.'