1 import random def roll_dice(): return random.randint(1, 6) def main(): total_score = 0 print("Welcome") while True: print("\n1. Roll the dice") print("2. Quit") choice = input("Enter your choice: ") if choice == '1': dice1 = roll_dice() dice2 = roll_dice() total = dice1 + dice2 print("You rolled {} and {}. Total: {}".format(dice1, dice2, total)) if dice1 == 1 and dice2 == 1: print("Oops! You rolled two 1s. You lose this round.") elif total == 2: print("Snake eyes! But you rolled only once, so you're safe for now!") elif total == 7 or total == 11: print("You win this round with a natural!") else: total_score += total elif choice == '2': print("Thanks for playing! Your total score is:", total_score) break else: print("Invalid choice. Please choose again.") if __name__ == "__main__": main()