0% found this document useful (0 votes)
7 views1 page

m88kzwfk

This document contains a Python script for a simple Rock, Paper, Scissors game. The player inputs their choice, and the computer randomly selects its choice, with the outcome being determined based on the rules of the game. The script handles all possible outcomes including win, lose, and draw scenarios.

Uploaded by

Jones Alwen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

m88kzwfk

This document contains a Python script for a simple Rock, Paper, Scissors game. The player inputs their choice, and the computer randomly selects its choice, with the outcome being determined based on the rules of the game. The script handles all possible outcomes including win, lose, and draw scenarios.

Uploaded by

Jones Alwen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

import random

choices = ["","ROCK","PAPER","SCISSOR"]
name = input("Enter the player name")
playerchoice = input("Enter your choice ROCK / PAPER/ SCISSOR")
computerchoice = random.randint(1,3)
if playerchoice == "ROCK" and computerchoice ==1:
print(choices[computerchoice])
print("draw")
elif playerchoice == "ROCK" and computerchoice ==2:
print(choices[computerchoice])
print("You Lost!!!")
elif playerchoice == "ROCK" and computerchoice == 3:
print(choices[computerchoice])
print("You Won")
elif playerchoice == "PAPER" and computerchoice == 1:
print(choices[computerchoice])
print("You Won")
elif playerchoice == "PAPER" and computerchoice == 2:
print(choices[computerchoice])
print("Draw")
elif playerchoice == "PAPER" and computerchoice == 3:
print(choices[computerchoice])
print("You Lost!!!")

elif playerchoice == "SCISSOR" and computerchoice == 1:


print(choices[computerchoice])
print("You LOST!!!!")
elif playerchoice == "SCISSOR" and computerchoice == 2:
print(choices[computerchoice])
print("You Won")
else:
print(choices[computerchoice])
print("Draw")

You might also like