-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrock_papper.py
64 lines (56 loc) · 1.14 KB
/
rock_papper.py
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)___
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
choose=int(input("What do you choose?\n 0 for Rock , 1 for Scissors and 2 for Papper\n"))
if choose==0:
print(rock)
elif choose==1:
print(scissors)
elif choose==2:
print(paper)
else:
print("error")
print("computer")
import random
random_number=random.randint(0,2)
if random_number==0:
print(rock)
elif random_number==1:
print(scissors)
elif random_number==2:
print(paper)
if choose==0 and random_number==1:
print("You Win")
elif choose==0 and random_number==2:
print("You Loss")
elif choose==1 and random_number==0:
print("You Loss")
elif choose==1 and random_number==2:
print("You Win")
elif choose==2 and random_number==0:
print("you Win")
elif choose==2 and random_number==1:
print("You Loss")
elif choose==random_number:
print("Draw")