0% found this document useful (0 votes)
21 views

A Project On Python

Uploaded by

mehraharshu95
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

A Project On Python

Uploaded by

mehraharshu95
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

dharaman Institute of Technolo

Bachelor of technology
in
CSE(6th SEM)

A PROJECT ON
STONE PAPER SCISSOR GAME
Submitted by :
Anjali Singh Rajput
CONTENTS
Introduction to Project
Symbols of the game
Abstract
Approach used
Algorithms used
Flowchart
Source Code
Output
Result
Conclusion
INTRODUCTION TO PROJECT
 Stone Paper Sessor (which is also called Rock Paper Scissor) is a hand
game and played between two people, in which each player
simultaneously forms one of three shapes.

 The winner of the game is decided as per the below rules:

•Rock vs Paper -> Paper wins.


•Rock vs Scissor -> Rock wins.
•Paper vs Scissor -> Scissor wins.

 In this game, the user will be asked to make choice and according to
the choice of user and computer and then the result will be displayed
along with the choices of both computer and user.
SYMBOLS OF THE GAME
ABSTRACT
 Stone-paper-scissors is a hand game that is played by two people.
The players count to three in unison and simultaneously "throw" one
of three hand signals that correspond to stone, paper or scissors. The
winner is determined by the rules:

1. Stone smashes scissors


2. Scissors cuts paper
3. Paper covers stone

 Rock-paper-scissors is a surprisingly popular game that many people


play seriously. Due to the fact that a tie happens around 1/3 of the
time.
 These shapes are “stone" (a closed fist), "paper" (a flat hand), and
"scissors" (a fist with the index finger and middle finger extended,
forming a V). "Scissors" is identical to the two-fingered V sign (also
indicating "victory" or "peace") except that it is pointed horizontally
instead of being held upright in the air.

 Stone paper scissors is often used as a fair choosing method between


two people, similar to coin flipping, drawing straws, or throwing dice
in order to settle a dispute or make an unbiased group decision.
Unlike truly random selection methods, however, rock paper scissors
can be played with a degree of skill by recognizing and exploiting
non-random behavior in opponents.
APPROACH USED
 In this project, python is used as it is advantageous for stone-paper-scissors game.

 In our first mini-project, we will build a Python function that takes as input the string
(name) which is one of Stone-paper-scissors the function then simulates playing a
round of Rock-paper-scissors by generating its own random choice from these
alternatives and then determining the winner using a simple rule that we will next
describe.

 While Stone-paper-scissor has a set of ten rules that logically determine who wins a
round of RPS, coding up these rules would require a number of if/elif/else clauses in
this mini-project code.

 A simpler method for determining the winner is to assign each of the three choices a
number:
1. Stone
2. Paper
ALGORITHM USED

Take user input

Make the computer choose

Determine the winner

Play several games in a raw


FLOWCHART
SOURCE CODE
OUTPUT
RESULT
 Prompt the user to select either Stone, Paper, or Scissors.

 Instruct the computer to randomly select either Stone, Paper, or


Scissors.

 Compare the user's choice and the computer's choice.

 Determine a winner (the user or the computer).

 Inform the user who the winner is.


CONCLUSION
The end strategy of a simple Stone 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.

In this, we learned how to:

•Code your own rock paper scissors game

•Take in user input with input()

•Play several games in a row using a while loop

•Clean up your code with Enum and functions

•Describe more complex rules with a dictionary


THANK YOU
ANJALI SINGH RAJPUT

You might also like