I am trying to make a dice rolling game. I want to generate a random integer in the range of the number of dice I have multiplied by the number of sides the dice has. For example, if two dice were played with three sides, then there could be any number between 2 and 6.
Here is my code; when I put in, for example one dice and two sides, it prints numbers upwards of 13. The problem is that it doesn't create an integer between the amount of sides and dice.
condition = "Start"
while condition == "Start":
Dice = int(input("Please select number of dice you would like to use (atleast 1)"))
Sides = int(input("Please select number of sides on dice you would like to use (atleast 2)"))
if Dice <= 0 and Sides <= 1:
condition = "Start"
elif Dice >= 1 and Sides >= 2:
print("You have selected", Dice," dice and", Sides,"Sides")
condition = "play"
Roll1 = 0
Roll2 = 0
Score1 = 0
Score2 = 0
while condition == "play":
Roll1 += randint(Dice,Sides)
Roll2 += randint(Dice,Sides)
print (name1,"'s Roll", Roll1)
print (name2,"'s Roll", Roll2)