import randomprint(' \t Welcome rolling dice game\n ')while True : input(' Press any key to roll') roll=random.randint(1,6) print(roll) stop= input( ' you want to roll. again ? \n if yes then enter y \n if not then enter n\n ') if stop=='y': continue elif stop=='n': breakprint(' Thanks for Playing:')
1 回答
守候你守候我
TA贡献1802条经验 获得超10个赞
尝试:
min = 6
max = 0
while True :
input(' Press any key to roll')
roll=random.randint(1,6)
print(roll)
if roll>max:
max = roll
if roll<min:
min = roll
添加回答
举报
0/150
提交
取消