In this assignment, you'll create an interactive Rock Paper Scissors game where a player
competes against the computer in a best of 3 match. This project will help you practice:
Variables & Data Types: Storing names, choices, and scores
Lists: Creating a list of valid choices
Random Selection: Using the random module to generate computer choices
Loops: Repeating rounds until someone wins 2 games
Conditional Logic: Determining winners based on game rules
String Formatting: Displaying results in a formatted way
Score Tracking: Keeping track of wins/losses and checking for a match winner
Expected Time: 3–4 hours
Difficulty: Easy to Medium
Recommended: Week 2 (Python Fundamentals)
📥 Download Project Files
Click below to download all the files you need to get started:
🎯 Learning Objectives
By completing this assignment, you'll be able to:
Use the random module to generate unpredictable choices
Use lists to store valid game options
Implement game logic with conditional statements
Track scores across multiple rounds
Format output strings for clear presentation
Create a complete, functioning game program
📋 Requirements
Your Rock Paper Scissors game must:
Get the player's name at the start
Play until someone wins 2 rounds (best of 3 — game ends immediately when someone reaches 2
wins)
In each round:
Display the round number
Ask the player to choose: Rock, Paper, or Scissors
Generate a random choice for the computer
Display both choices
Determine the winner of that round
Update the score
Display the result
Keep accurate scores for both player and computer and check after each round if someone has
won 2
Display final results in this exact format:
If player wins:
"{user_name} won game 1 with {choice1} vs {computer_choice}, and game 2 with {choice2} vs
{computer_choice2}!"
If player loses: "{user_name} lost!"
Use the random module to generate computer choices
Use a list to store valid game choices
Validate input - ensure player chooses a valid option
Handle case-insensitive input - "rock", "Rock", "ROCK" should all work
📁 Files in Your Assignment
rps.py — Your main game file with TODO
markers to guide you
cheat_sheet.py — Helpful reference
code snippets (use when you get stuck)
🚀 Getting Started
Open rps.py in VS Code
If you need a code example, see cheat_sheet.py
Test your game by running it in the terminal: python rps.py