import random def roll_dice(): return random.randint(1, 6), random.randint(1, 6) def play_game(): print("Welcome to the Dice Game!") num_players = int(input("Enter the number of players: ")) scores = [] for i in range(num_players): input(f"Player {i + 1}, press Enter to roll the dice") die1, die2 = roll_dice() total = die1 + die2 print(f"Player {i + 1} rolled: {die1} and {die2} (Total: {total})") scores.append(total) winner = scores.index(max(scores)) + 1 print(f"Player {winner} wins with a score of {scores[winner - 1]}! Unlucky uce!") if __name__ == "__main__": play_game()