Coders Packet

Rock, Paper, Scissors Game in Python

By Chithra Vinod

This is the old school "rock paper scissors" game (in python) where the user plays with the system

This is the rock paper scissors game where the user is playing with the system.

Here, first, we create a list containing rock, paper and scissors. Then the system generates random values from this list as per called. So when we say the user is playing with the system, it means that the system generates random option from any of the three. For that, we import randint from the random module.

Then we ask the user to input their option and the compiler checks the conditions in the code and gives the result as per who won(for each round) and even if the user enters the keyword in lowercase, uppercase or any other, it will not matter because we have used .lower() function for that.

At last, after 10 rounds, the final scores are tallied and the winner is declared!

Download Complete Code

Comments

No comments yet