摘要:
2.1 標(biāo)識(shí)符與關(guān)鍵字標(biāo)識(shí)符規(guī)則一:關(guān)于引導(dǎo)字符和后續(xù)字符,只要是Unicode編碼的字符都可以作為引導(dǎo)字符包括ASCII字符,下劃線(_),以及大多數(shù)非英文字符。后續(xù)字符是任意的引導(dǎo)字符,或者非空格,包括Unicode中認(rèn)為是數(shù)字的字符。標(biāo)識(shí)符大小寫敏感。規(guī)則二:標(biāo)識(shí)符不能與Python的關(guān)鍵字重名。Python中的關(guān)鍵字:and continue except global lambda pass whileas def False if None raise withassert del finally import nonlocal return yieldbreak elif for 閱讀全文
posted @ 2011-05-25 12:15
小蘇打
閱讀(243)
評(píng)論(0)
推薦(0)
摘要:
只是做了一部分,沒(méi)有全部做,有的題目,2題合并為一題了。1.1View Code 1 numbers = [] 2 count = 0 3 sum = 0 4 mean = 0 5 6 while True: 7 try: 8 line = input("enter a number or Enter to finish:") 9 if line: 10 num = int(line) 11 if num not in numbers: 12 numbers.append(num) 13 count += 1 14 sum += num 15 else: 16 break 閱讀全文
posted @ 2011-05-25 00:17
小蘇打
閱讀(272)
評(píng)論(0)
推薦(0)
浙公網(wǎng)安備 33010602011771號(hào)