Skip to content

Rock, Paper, Scissors is a classic game that resonates with folks from around the world. We build this game with python language.

Notifications You must be signed in to change notification settings

wissamn19/Rock_paper_scissors_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

✅Rock,Paper,Scissors game (Codedex checkpoint project):

Rock, Paper, Scissors is a classic game that resonates with folks from around the world.

Create a rock_paper_scissors.py program where the user plays a round of Rock, Paper, Scissors against the computer.

The rules are as follows:

Rock beats Scissors. Scissors beat Paper. Paper beats Rock. First, create a player and a computer variable.

Prompt the player to select number between 1 and 3 with input() and store it in player:

1 is for '✊' (Rock). 2 is for '✋' (Paper). 3 is for '✌️' (Scissors). Then, use the random.randint() method to assign a number to the computer variable (1 to 3).

Lastly, use control flow to compare the user's choice and the computer's choice, determine the winner, and print out who won.

About

Rock, Paper, Scissors is a classic game that resonates with folks from around the world. We build this game with python language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages