Rock Paper Scissor Game in Python | Console Mini Project for Beginners

Rock Paper Scissor Game in Python | Console Mini Project

🎮 Rock Paper Scissor Game in Python (Console Based)

This Rock Paper Scissor game is a beginner-friendly console project in Python. It uses simple logic, random choices, and loop control to allow multiple rounds of play. It’s a perfect starting point to practice conditionals and user interaction.

📜 Game Rules:

  • Rock beats Scissor
  • Scissor beats Paper
  • Paper beats Rock

🧑‍💻 Python Code:

from random import choice

values = ["rock", "paper", "scissor"]
c = choice(values)
run = True

while run:
    print("\tOption \n1.rock\n\n2.paper\n\n3.scissor")
    try:
        n = input("\nEnter a Choice : ").lower()
    except ValueError:
        print("nInvaild Choice")

    print("\nYour Gues     : " + n)
    print("\nComputer Gues : " + c)

    if (n == "paper" and c == "rock") or (n == "scissor" and c == "paper") or (n == "rock" and c == "scissor"):
        print("\nYou Won")
    elif (c == "paper" and n == "rock") or (c == "scissor" and n == "paper") or (c == "rock" and n == "scissor"):
        print("\nComputer Won")
    elif n == c:
        print("\nDraw Match")
    else:
        print("\nInvaild Choice")
        break

    option = 0
    try:
        option = int(input("\nDo You Want To Play Click 1 To Play Otherwise 0 : "))
    except ValueError:
        print("\nInvaild Choice")

    if option != 1:
        if option != 0:
            print("\nYour Click ", option, "Button So Game Exit")
        print("\nThanks For Coming")
        run = False
  

🚀 Project Highlights:

  • Uses Python's random.choice() for computer moves
  • Supports user input and loop to replay game
  • Great for Python beginners to practice conditionals

🔁 Replay the game, beat the computer, and learn Python in the process!
👉 Subscribe to our YouTube for more Python projects & gaming content.

Post a Comment

Previous Post Next Post