选择 = 4 和 6 和 12 谢谢
import random
print("Are you feeling lucky today?")
loop='y'
while loop=='y':
pick=int(input("Select your dice(4,6,12) then press enter:"))
if pick in [4,6,12]:
print("The "+str(pick) +" sided dice was thrown and your score is "+str(random.randint(1,pick)))
else:
print("Invalid number. You are meant to select a 4, 6 or 12 sided dice!")
loop=input('Dare to go again?(y/n)?')
if loop=='n':
print("Thanks for playing!")
input("按回车键退出:")