<p>我试图生成能够有一个骰子数,然后选择骰子上的边数这是我的代码我该如何使这一工作</p>
<pre><code>print("\n") #Creates new program
print("Welcome...")
print("You are are playing a game of dice, this is a two player game, who ever rolls the highest number wins")
name1 = input("What is Player 1's Name?") #Inputs "player 1's" name
print("Hello", name1)
name2 = input("What is Player 2's Name?")
print("Greetings",name2)
from random import randint
Dice = input("Please select number of dice you would like to use (atleast 1)")
Sides = input("Please select number of sides on dice you would like to use")
print("You have selected", Dice," dice and", Sides,"Sides")
Roll11 = int(randint(Dice,Sides))
Roll12 = int(randint(Dice,Sides))
print ("Player 1's Roll")
print(Roll11)
print ("Player 2's Roll")
print (Roll12)
</code></pre>