Skip to content

AgrawalSujal/rock-paper-scissors-python-cli-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🪨📄✂️ Rock, Paper, Scissors Game in Python – Beginner-Friendly CLI Project

Banner Image Python License: MIT Status PRs Welcome

This is a simple and fun Rock, Paper, Scissors game using Python. It's a console-based mini project where the player competes against the computer for 5 rounds. Ideal for Python beginners, this project helps you practice input handling, conditional logic, and using the random module.

🔍 Keywords: rock paper scissors python, python beginner project, python console game, mini project using python, random module example, fun coding project


🎮 Game Rules

  • Both the user and the computer choose from:
    Rock, Paper, or Scissor.
  • Standard rules apply:
    • Rock beats Scissor
    • Scissor beats Paper
    • Paper beats Rock
  • The game continues for 5 rounds, and scores are tracked to determine the winner.

✅ Features

  • 🖥️ Console-based interactive Python game
  • 🧠 Implements if-else logic for decision-making
  • 🎲 Random choices by the computer using Python's random.choice()
  • 🧮 Score tracking for both the user and the computer
  • 🚫 Input validation with error handling for invalid choices

🚀 Why This Project?

This is a great first Python project for beginners to:

  • Learn basic Python syntax
  • Understand user input and conditional statements
  • Explore the random module
  • Build a fun, real-world command-line game

It’s often recommended as a starter project for those learning Python via YouTube tutorials, bootcamps, or self-study.


📋 How to Run

  1. Ensure Python 3.x is installed on your system.
  2. Save the code in a file called rock_paper_scissors.py.
  3. Open a terminal and run the script:
python rock_paper_scissors.py

📂 File Structure

rock_paper_scissors.py   # Python script with game logic
README.md                # Project documentation and instructions

💡 Ideal For

Python learners seeking hands-on practice

Students working on Python mini projects

Anyone wanting to build a simple CLI game

Tutorials, coding challenges, and hackathons

Technologies:

  • Python 3
  • Simple AI implementation

Keywords:

  • Rock Paper Scissors game
  • Python game
  • Python game development
  • Python tutorial
  • AI in Python

Feel free to fork and contribute to improve the game!!

🧑‍💻 Author

Sujal Agrawal Open-source enthusiast | Python beginner project collection

About

A beginner-friendly Python command-line game of Rock, Paper, Scissors with score tracking, random logic, and input validation. Great for learning Python basics and building mini projects.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages