import random outcome1 = 0 outcome2 = 0 total_outcome = 0 roll = input("Would you like to roll? (y/n)") if roll == "y": print("Roll 1...") outcome1 = random.randint( 1, 6 ) print("You rolled", outcome1) total_outcome = outcome1 roll2 = input("Would you like to roll again? (y/n)") if roll2 == "y": print("Roll 2...") outcome2 = random.randint( 1, 6 ) print("You rolled", outcome2) if outcome1 == outcome2: print("Snake eyes!!!") else: total_outcome = outcome1 + outcome2 if roll or roll2 == "n": print("Your total score is", total_outcome)