大家好,我想做一个简单的掷骰子应用程序,当你按回车时,它将打印一个骰子面。我的问题是:我如何才能使它不需要再次打开文件(python dice_roll.py)?我是初学者,请不要欺负我。谢谢。dice_list = [dice1, dice2, dice3, dice4, dice5, dice6]
random.choice(dice_list)()
enter= input("Press Enter to roll the dice"
编写了下面的程序,但是如何避免系统在按enter时检查两个参数,我们正在使用enter键退出while循环。while True: # need to exit the while loop thru one <Enter>
itemcode, quantity = input("Enteritem code and quantity (P