代码拉取完成,页面将自动刷新
import random
frequency1 = 0
frequency2 = 0
frequency3 = 0
frequency4 = 0
frequency5 = 0
frequency6 = 0
for roll in range(1, 6001):
face = random.randrange(1, 7)
if face == 1:
frequency1 += 1
elif face == 2:
frequency2 += 1
elif face == 3:
frequency3 += 1
elif face == 4:
frequency4 += 1
elif face == 5:
frequency5 += 1
elif face == 6:
frequency6 += 1
else:
print('never get here!')
print("face {:>13}".format("Frequency"))
print(" 1 {:>13}".format(frequency1))
print(" 2 {:>13}".format(frequency2))
print(" 3 {:>13}".format(frequency3))
print(" 4 {:>13}".format(frequency4))
print(" 5 {:>13}".format(frequency5))
print(" 6 {:>13}".format(frequency6))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。