So I am trying to create a pig like game in python and I am trying to make a computer player I figured this code but can't seam to get it to make the rolls the number of times. So fore example I want to make it so if the computer rolls a 2 then I want it to roll again until the number of rolls gets to 10. I hope that made sense. So if the computer rolls a 6 then I want the computer to roll 3 times and add 1 until it gets to 10 and then pass back to you. Here is my code that I got so fare to test the AI.
dice = random.randint(1,6)
print("Computer rolled ")
if rolls == 10:
Do I need to have another random roll statement fore the rolls? The dice is supposed to be fore the score.