import random finalscore = 0 roll = 1 snakeeye = 0 rollagain = 'y' while snakeeye == 0 and rollagain == 'y': print('Roll', roll, '--------------------') dice1 = random.randint( 1, 6) dice2 = random.randint( 1, 6) total = dice1 + dice2 print('You roll', dice1, 'and', dice2) if dice1 == dice2: snakeeye = snakeeye + 1 if snakeeye == 1: print('Game Over -------------------------') print('Your final score: 0') print('Your score is', total) finalscore = finalscore + total roll = roll + 1 rollagain = input('Roll again (y/n)? ') if rollagain == 'n': print('Your final score:', finalscore )