Week 2 Assignment

Rock Paper Scissors Game (Best of 3)

📝 Overview

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:

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:

  1. Use the random module to generate unpredictable choices
  2. Use lists to store valid game options
  3. Implement game logic with conditional statements
  4. Track scores across multiple rounds
  5. Format output strings for clear presentation
  6. Create a complete, functioning game program

📋 Requirements

Your Rock Paper Scissors game must:

  1. Get the player's name at the start
  2. Play until someone wins 2 rounds (best of 3 — game ends immediately when someone reaches 2 wins)
  3. 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
  4. Keep accurate scores for both player and computer and check after each round if someone has won 2
  5. 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!"
  6. Use the random module to generate computer choices
  7. Use a list to store valid game choices
  8. Validate input - ensure player chooses a valid option
  9. Handle case-insensitive input - "rock", "Rock", "ROCK" should all work

📁 Files in Your Assignment

🚀 Getting Started

  1. Open rps.py in VS Code
  2. If you need a code example, see cheat_sheet.py
  3. Test your game by running it in the terminal: python rps.py