标签:+= car form change hang dom for else 问题
我认为增加中奖的概率
不换1/3 换2/3
form random import*
t=10000
first=0
change=0
for i in range (t):
a="羊1","羊2","车"
car=choice(a)
my=choice(a)
if car=my
first=n+=1
else:
change=n+=1
print("不改选择:{}"format(first/t))
print("更改选择:{}"。format(change/t))
标签:+= car form change hang dom for else 问题
原文地址:http://www.cnblogs.com/slysly/p/7707280.html