









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This project is about a game usually played by two people, where players make one of three shapes with their hands at the same time. The "rock" beats scissors, the "scissors" beat paper and the "paper " beats rock; if both players throw the same shape, the game is tied
Typology: Slides
1 / 15
This page cannot be seen from the preview
Don't miss anything!










TEAM
CONCEPTS USED
MORE DETAILS.... It’s easier for a computer to work with numbers. So, for this program, the computer will assign a number to each choice
CODE import random Cchoice = ["Rock", "Paper", "Scissor"] # list for computer while True: print("Rock Paper scissor Game:") youwin, computerwin = 0, 0 for i in range(1, 6): # 5 Round game print("Round", i, "Start:") print("Please select any one option:") print("1.Rock", "2.Paper", "3.Scissor", sep="\n") # choice any option but in number 1,2, Yourchoice = int(input()) if Yourchoice == 1: print("You select Rock") Yourchoice = "Rock" elif Yourchoice == 2: print("You select paper") Yourchoice = "Paper" elif Yourchoice == 3: print("You select scissor") Yourchoice = "Scissor" else: print("Invalid Choice") break
Computerchoice = random.choice(Cchoice) # random select by computer choice print("Computer select:", Computerchoice)
if Yourchoice == Computerchoice: youwin += 1 computerwin += 1 print("This Round is Draw:") elif (Yourchoice == "Paper" and Computerchoice == "Rock") or ( Yourchoice == "Rock" and Computerchoice == "Scissor") or ( Yourchoice == "Scissor" and Computerchoice == "Paper"): youwin += 1 print("You win this Round")
OUTPUT
CONCLUSION The end strategy of a simple Rock Paper Scissors game is to be random and fast. Statistically, each attack will tend to occur just as frequently as another ,given that each is equally effective. So, this was an easy and fun way to create a rock paper scissors game. It is customizable, as per a developer's personal preference. Not just rock paper and scissors game but many more games can be developed easily in Python using various tools and libraries available.