Solution
Hints
Steps
  1. Import the random module.
  2. Ask for and store the player's choice as an integer.
  3. Generate the computer's choice with random.randint(1, 3).
  4. Print both choices by name so the player can see what happened.
  5. Use if/elif/else to check for a tie, then check the three ways the player can win, otherwise the computer wins.
import random CHOICES = {1: "Rock", 2: "Paper", 3: "Scissors"} player = int(input("Choose 1-Rock, 2-Paper, or 3-Scissors: ")) computer = random.randint(1, 3) print(f"You chose {CHOICES[player]}. Computer chose {CHOICES[computer]}.") if player == computer: print("It's a tie!") elif ( (player == 1 and computer == 3) or (player == 2 and computer == 1) or (player == 3 and computer == 2) ): print("You win!") else: print("Computer wins!")