赞
踩
# 引入生成随机数模块import randomwhile int(input('Press 1 to roll the dice or 0 to exit:')): # 输入1开始投掷,输入0退出 print(random.randint(1,6))
效果如图