Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 56bce7c

Browse files
Update Rock-Paper-Scissors Game.py
1 parent ef22c47 commit 56bce7c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎projects/GUI Rock-Paper-Scissors Game/Rock-Paper-Scissors Game.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
# Import Required Library
12
from tkinter import *
23
from tkinter import ttk
34
from random import *
45

6+
# Create Object
57
root = Tk()
68

9+
# Set geometry
710
root.geometry("500x500")
811

912
root.title("Rock-Paper-Scissors-Game")
1013

14+
# List of players
1115
list = ["rock","paper","scissors"]
1216

1317
choose_number = randint(0,2)
14-
print(choose_number)
18+
print(choose_number)# For testing if it works
1519

1620
label = Label(root,text="Computer ",width = 20,height=4,font=("algerian",15))
1721
label.pack()
@@ -55,11 +59,12 @@ def spin():
5559

5660

5761

58-
62+
# Adding dropdown box for Rock,Paper,Scissors
5963
user_select = ttk.Combobox(root,value=["Rock","Paper","Scissors"])
6064
user_select.current(0)
6165
user_select.pack()
6266

67+
# Add Labels,Button
6368
wl_label = Label(root,text="",font=("arial",10),width=50,height=4)
6469
wl_label.pack()
6570

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /