🔹 Introduction

The Rock, Paper, Scissors Game is a classic hand game that you can easily build in Python.
- The player chooses Rock, Paper, or Scissors.
- The computer randomly chooses one too.
- The winner is decided based on the game rules.
👉 Rules:
- Rock beats Scissors
- Scissors beats Paper
- Paper beats Rock
🔹 Code Example
import random
print("🎲 Welcome to Rock, Paper, Scissors Game!")
choices = ["rock", "paper", "scissors"]
while True:
# Player choice
player = input("👉 Enter rock, paper, or scissors (or 'q' to quit): ").lower()
if player == "q":
print("👋 Thanks for playing! Goodbye.")
break
if player not in choices:
print("⚠️ Invalid choice. Please try again.")
continue
# Computer choice
computer = random.choice(choices)
print(f"💻 Computer chose: {computer}")
# Decide winner
if player == computer:
print("🤝 It's a tie!")
elif (player == "rock" and computer == "scissors") or \
(player == "scissors" and computer == "paper") or \
(player == "paper" and computer == "rock"):
print("🎉 You win!")
else:
print("😢 You lose!")
🔹 Example Run
🎲 Welcome to Rock, Paper, Scissors Game!
👉 Enter rock, paper, or scissors (or 'q' to quit): rock
💻 Computer chose: scissors
🎉 You win!
👉 Enter rock, paper, or scissors (or 'q' to quit): paper
💻 Computer chose: scissors
😢 You lose!
👉 Enter rock, paper, or scissors (or 'q' to quit): q
👋 Thanks for playing! Goodbye.
🔹 Concepts Learned
- random.choice() → lets the computer pick a random option.
- while loop → allows continuous play until the player quits.
- if/elif/else → determines the winner.
- string methods (like
.lower()
) to handle user input better.
🔹 Summary
- Built a Rock, Paper, Scissors game in Python.
- Practiced loops, random choices, and conditionals.
- Added option to quit (
q
).