Skip to content
Programmingoneonone - Logo
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Computer System Architecture
    • Microprocessor
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
      • Data Structures Solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone - Logo
Programmingoneonone

Rock, Paper, Scissors Game in Python

Yashwant Parihar, 14 November 202614 November 2026

In this post, we will learn how to make a game of rock, paper, scissors using python. Building a Rock, Paper, Scissors game in Python is one of the best ways to practice coding as a beginner. Instead of just reading about how loops and if-else statements work, you get to actually use them to build something fun and playable.

ASCII Art of Rock, Paper and Scissors

rock = """
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
"""

paper = """
     _______
---'    ____)____
           ______)
          _______)
         _______)
---.__________)
"""

scissors = """
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
"""

You can add these ASCII Art in your python code to show it more visually engaging. These Art prints hand gesture for each move instead of plan text.

Complete Rock, Paper, Scissors Python Code

rock = """
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
"""

paper = """
     _______
---'    ____)____
           ______)
          _______)
         _______)
---.__________)
"""

scissors = """
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
"""

print("What do you choose? Type 0 for Rock, 1 for paper and, 2 for scissors")
user_input = int(input())
if user_input == 0:
    print("User Input: Rock\n" + rock)
elif user_input == 1:
    print("User Input: Paper\n"+ paper)
elif user_input == 2:
    print("User Input: Scissors\n"+ scissors)
else:
    print("Invalid choice. Please type 0, 1, or 2.")
    exit()

import random

computer_choice = random.randint(0, 2)
if computer_choice == 0:
    print("Computer Input: Rock\n" + rock)
elif computer_choice == 1:
    print("Computer Input: Paper\n"+ paper)
elif computer_choice == 2:
    print("Computer Input: Scissors\n"+ scissors)

if user_input == computer_choice:
    print("It's a Draw")
elif (user_input == 0 and computer_choice == 2) or \
     (user_input == 1 and computer_choice == 0) or \
     (user_input == 2 and computer_choice == 1):
    print("You Win!")
else:
    print("You Lose!")


Copy the code above into your Python editor and run it to play against the computer. Feel free to customize the ASCII art or add a score counter to take this project further!

python python tutorials Pythonpython tutorials

Post navigation

Previous post

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy
  • DMCA

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes