Coders Packet

Rock-Paper-Scissor Game in Python Using Tkinter

By Ayushi Poddar

The project is for the classic rock-paper-scissor game in Python using Tkinter. The game is between the user and the computer with some basic simple rules and having to a chance to defeat the computer.

The Python code is for the class rock-paper-scissor game.
Language used is - Python

The Tkinter package is imported and used for adding GUI to our project.

The game is between the user and the computer with basic simple rules which are as following:

1. Rock defeats Scissor but not paper.
2. Scissors defeats Paper but not Rock.
3. Paper defeats Rock but not Scissor.

The random packaged is imported in a Python file for the computer to generate random responses. The user is first asked to enter their choice, R for rock, P for Paper and S for scissor. Based on their input and the computer's output, the final result is declared!

The input and the output will be shown in the 2nd screen, which will also consist of the score while the first screen is for the input of your choice. The window will automatically close after clicking on the required button.

Download Complete Code

Comments

No comments yet