im trying to make it so that it will do the calculation no matter what the number inputted is, im not very experienced in python and im making something that will have a dice with 'x' amount of sides and it will look for 'x' amount of pairs to see for example how many dice rolls it would take to roll 6 sixes. sorry if ive worded this badly
time is how many times its rolled the dice
pairs is the amount of pairs it is looking for
sides is how many sides/numbers the dice has
import random
sides = int(input("How many Dice Sides/Numbers: "))
pairs = int(input("How many Pairs to Search for: "))
time = 0
if pairs == 2:
while True:
time += 1
one = random.randint(1, sides)
two = random.randint(1, sides)
if one == two:
break
if pairs == 3:
while True:
time += 1
one = random.randint(1, sides)
two = random.randint(1, sides)
three = random.randint(1, sides)
if one == two and two == three:
break
input(f"Found a Pair after {time} times.")
i.e how would i make it work with ANY number i input for the pairs, sorry again if this is not possible