Handling Exceptions,handlingexceptions,# It is poss
Handling Exceptions,handlingexceptions,# It is poss
# It is possible to write programs that handle selected exceptions. Look at the following example, which prints a table of inverses of some floating point numbers:numbers = [0.3333, 2.5, 0, 10]for x in numbers: print x, try: print 1.0 / x except ZeroDivisionError: print '*** has no inverse ***'
- Set font from Root component,fontcomponent,from Tkinte
- Math: abs and pow,mathabsandpow,import mathp
- Assigning Consecutive Values,,print range(
- String Simple Conversion:,simpleconversion,# The simpl
- Import enclosing module,importenclosing,X = 99def se
- Arc with start degree and end degree,arcdegree,from Tk
热门文章:
相关内容
- Set font from Root component,fontcomponent,from Tkinter
- Math: abs and pow,mathabsandpow,import mathp
- Assigning Consecutive Values,,print range(
- String Simple Conversion:,simpleconversion,# The simple
- Import enclosing module,importenclosing,X = 99def se
- Arc with start degree and end degree,arcdegree,from Tkinter
- Output exception arguments, string representation of exception,and th
- Recursive definition of function factorial,recursivefactorial,def f
- type function used for class,functionused,class Classi
- Strings translate,stringstranslate,s = raw_inpu
评论关闭