import random def roll_dice(): return random.randint(1, 6) def main(): score = 0 roll_again = 'y' while roll_again.lower() == 'y': dice1 = roll_dice() dice2 = roll_dice() print(f"Rolling dice... You rolled: {dice1}, {dice2}") if dice1 == 1 and dice2 == 1: print("Snake Eyes! You lose.") score = 0 break score += dice1 + dice2 print(f"Current score: {score}") roll_again = input("Roll again? (y/n): ") print(f"Final score: {score}") if __name__ == "__main__": main()