软件Python
tuchixiong
这个作者很懒,什么都没留下…
展开
-
One example for learning "for and while"
Number = 25 running = True while running: Guess = int(raw_input('enter a number:')) if Guess == Number: print "you guess the right value" running = False elif Guess原创 2014-10-29 15:57:03 · 224 阅读 · 0 评论 -
形参 关键参数
def printmax(x,y=6): if x>y: print 'the maxvalue is ',x else: print 'the maxvalue is ',y printmax(3,4) a=3 b=7 printmax(a,b) printmax(2) printmax(y=3,x=5)原创 2014-10-30 14:11:10 · 306 阅读 · 0 评论 -
Python 中调用函数的Docstring
def printmax(x,y): '''You are a girl. don't your.''' x=int(x) y=int(y) if x>y: return x else: return y print printmax(3,5) print printmax.__do原创 2014-11-06 10:07:39 · 1160 阅读 · 0 评论