player = None
computer = random.choice(options)
while player not in options:
player = input("Enter a choice (rock, paper, scissors): ").lower()
print(f"Player: {player}")
print(f"Computer: {computer}")
if player == computer:
print("It's a tie!")
elif options.index(player) == winning.index(computer):
print("You win !")
else:
print("You lose!")
if not input("Play again? (y/n): ").lower() == "y":
running = False
import random
options = ("rock", "paper", "scissors") winning = ("scissors", "rock", "paper") running = True
while running:
print("Thanks for playing!")