Re[2]: [Tutor] <TUTOR>My first (er...working...) script ever

Anna Ravenscroft revanna@mn.rr.com
Sat Feb 22 22:33:01 2003


On Saturday 22 February 2003 20:57, Predrag Ivanovic wrote:

> Something like this,maybe?
> ----------------
> choice="o"
> while choice !="e":
>       if choice =="k":
>          r=int(raw_input("r:"))
>          print "whatever ",krug(r)
> ---------------------------------
> How    do   i   evaluate  value  and  raise  an  exception  if  input  is 
> ,for instance,"church police" instead of "42"?

r = raw_input("r:")
try:
	newr = int(r)
	print "whatever ",krug(r)"
except:
	print "That is not a number. "

HTH
Anna