Paper, Scissors, Rock

Cynthia Lo
May 12, 2024

--

Create a program which simulates Rock, Paper, Scissors Game Steps:

Ask user to select rock, paper or scissors

Then generate computer selection by using random module

Then determine winner based on computer selection and user selection

Finally, ask whether they want to play again or not

Sample Output:

Enter a choice (rock, paper, scissors): paper
You chose paper, computer chose scissors.
Scissors cuts paper! You lose.
Play again (Y/N)? Y
Enter a choice (rock, paper, scissors): paper
You chose paper, computer chose scissors.
Scissors cuts paper! You lose.
Play again (Y/N)? Y
Enter a choice (rock, paper, scissors): rock
You chose rock, computer chose paper.
Paper covers rock! You lose.
Play again (Y/N)?
Hint
Use choice() function from random module to select random elements from option list.

===============================================================

[Professional Method]:

[Advanced Method]:

[Basic & Stupid Method]

--

--

Cynthia Lo
Cynthia Lo

Written by Cynthia Lo

0 Followers

For Practice Code Purpose (一天一點點進步) f/t小寶

No responses yet