python_模拟抛硬币
2022-04-28 17:44:01 0 举报
python_模拟抛硬币
作者其他创作
大纲/内容
False
result.append('正面')
n in range(len(s))
not ignore
正面
True
counts > 100
s.find('正面' * n) != -1
num % 2 == 0
num % 2
开始
i = 0result = []counts = int(counts)
import random
counts <= 50
i = i + 1
ff = n
print(result[i])
s.find('反面' * n) != -1
开始抛硬币实验……
结束
heads += 1c_heads += 1
i < counts
ignore = False
f = result.count('正面')b = result.count('反面')s = ''.join(result)
i = 0
bb = n
ignore = True
print('开始模拟:')
counts = input('输入模拟次数:')
收藏
0 条评论
下一页