摘要:
# this one is like your scripts with argvdef print_two(*args):arg1, arg2 = args print "arg1: %r, arg2: %r" % (arg1, arg2)# ok, that *args is actually ... 阅读全文
posted @ 2014-10-23 21:32
林中细雨
阅读(150)
评论(0)
推荐(0)
摘要:
from sys import argv from os.path import existsscript, from_file, to_file = argvprint "Copying from %s to %s" % (from_file, to_file)# we could do thes... 阅读全文
posted @ 2014-10-23 21:27
林中细雨
阅读(157)
评论(0)
推荐(0)
摘要:
from sys import argvscript, filename = argvprint "We're going to erase %r." % filename print "If you don't want that, hit CTRL-C (^C)." print "If you ... 阅读全文
posted @ 2014-10-23 21:23
林中细雨
阅读(134)
评论(0)
推荐(0)
摘要:
Defination:累积分布函数:The cumulative distribution function (CDF) does just that. The CDF at point x tells us whatfraction of events has occurred “to the l... 阅读全文
posted @ 2014-10-23 21:01
林中细雨
阅读(431)
评论(0)
推荐(0)
摘要:
from sys import argvscript, filename = argvtxt = open(filename)print "Here's your file %r:" % filename print txt.read()print "Type the filename again:... 阅读全文
posted @ 2014-10-23 12:09
林中细雨
阅读(139)
评论(0)
推荐(0)
摘要:
from sys import argvscript, user_name = argvprompt = '> 'print "Hi %s, I'm the %s script." % (user_name, script)print "I'd like to ask you a few quest... 阅读全文
posted @ 2014-10-23 12:05
林中细雨
阅读(170)
评论(0)
推荐(0)
摘要:
from sys import argvscript, first, second, third = argvprint "The script is called:", scriptprint "Your first variable is:", firstprint "Your second v... 阅读全文
posted @ 2014-10-23 11:57
林中细雨
阅读(232)
评论(0)
推荐(0)
摘要:
age = raw_input("How old are you? ")height = raw_input("How tall are you? ")weight = raw_input("How much do you weigh? ")print "So, you're %r old, %r ... 阅读全文
posted @ 2014-10-23 11:37
林中细雨
阅读(134)
评论(0)
推荐(0)
摘要:
print "How old are you?",age = raw_input()print "How tall are you?",height = raw_input()print "How much do you weigh?",weight = raw_input()print "So, ... 阅读全文
posted @ 2014-10-23 09:33
林中细雨
阅读(137)
评论(0)
推荐(0)
浙公网安备 33010602011771号