-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.py
More file actions
36 lines (29 loc) · 752 Bytes
/
Game.py
File metadata and controls
36 lines (29 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import random
x = random.random()
if x<0.3:
x = "sang"
elif x>=0.3 and x<=0.6:
x = "gheychi"
else:
x = "kaghaz"
y = input("entekhabe shoma")
if x==y:
print("=== mosavi ===")
print("x =", x)
print("entekhabe shoma =", y)
elif x=="sang" and y=="gheychi":
print("x barande ast")
print("x =", x)
print("entekhabe shoma =", y)
elif x=="gheychi" and y=="kaghaz":
print("x barande ast")
print("x =", x)
print("entekhabe shoma =", y)
elif x=="kaghaz" and y=="sang":
print("x barande ast")
print("x =", x)
print("entekhabe shoma =", y)
else:
print("Tabrik! shoma barande shodid")
print("x =", x)
print("entekhabe shoma =", y)