作者timerover (再也不会输了!!!)
看板Python
标题Re: [问题] 卡关了...
时间Wed Oct 25 23:47:04 2006
import random
count = 0
for i in range(100):
if random.randint(0, 1) == 1:
count = count + 1
print 'head'
else:
print 'tail'
print 'head:', count
print 'tail:', 100 - count
大约这样吧
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.90.104
1F:→ supencham:谢谢指导~!! 10/26 10:32