import random dice1 = random.randint( 1, 6 ) dice2 = random.randint( 1, 6 ) total = dice1 + dice2 finalscore = 0 roll = 1 print("Roll", roll, "--------------") print("You roll", dice1, "and", dice2) if total == 2 : print("Snake eyes!") print(' ') print("Game Over -----------") finalscore = finalscore - finalscore print("Your final score:", finalscore) else: print("Your score is", finalscore) print(' ') roll = roll + 1 finalscore = finalscore + total yn = input("Roll again? (y/n) ") while yn == "y" : dice1 = random.randint( 1, 6 ) dice2 = random.randint( 1, 6 ) total = dice1 + dice2 print("Roll", roll, "--------------") print("You roll", dice1, "and", dice2) if total == 2 : print("Snake eyes!") print(' ') print("Game Over -----------") finalscore = finalscore - finalscore print("Your final score:", finalscore) else: print("Your score is", finalscore) print(' ') roll = roll + 1 finalscore = finalscore + total yn = input("Roll again? (y/n) ") else: print("Game Over -----------") print("Your final score:", finalscore) # I made this code while still figuring out how to make it loop infinitely, and then couldn't be bothered making it simpler. # Also, sorry if it's broken, but I'd rather light my eyebrows on fire than look at this mess of code again.